[Insight-users] link error
Luis Ibanez
luis.ibanez at kitware.com
Mon Mar 10 15:41:57 EDT 2008
Hi Yannick,
Apparently you are missing to link to "itksys".
What is strange in your report is that you mention
that you are configuring your project using CMake.
If that is the case, CMake should have anticipated
the dependency between any ITK library and "itksys"
and should have added "itksys" to the list of libraries
to link with.
In other words, we have never found necessary to explicitly
add "itksys" to the list of libraries in a CMake command
TARGET_LINK_LIBRARIES(target libraries)
when we have already listed any of the ITK libraries in
that command.
Something else may be going on with your build....
Are you doing this on Unix/Linux ?
Are you explicitly adding all the libraries that
you mentioned below ?
If so, you may be adding them in an incorrect order.
Please post to the list the TARGET_LINK_LIBRARIES()
command of your executable.
Thanks
Luis
---------------------
Yannick Pannier wrote:
> Hi,
>
> When trying to compile my project (configured with cmake), I've got the
> following linkage error.
>
> In function `itk::ImageFileReader<itk::Image<unsigned short, 3u>,
> itk::DefaultConvertPixelTraits<unsigned short>
> >::TestFileExistanceAndReadability()':
> menus.cxx:(.text._ZN3itk15ImageFileReaderINS_5ImageItLj3EEENS_25DefaultConvertPixelTraitsItEEE31TestFileExistanceAndReadabilityEv[itk::ImageFileReader<itk::Image<unsigned
> short, 3u>, itk::DefaultConvertPixelTraits<unsigned short>
> >::TestFileExistanceAndReadability()]+0x26): undefined reference to
> `itksys::SystemTools::FileExists(char const*, bool)'
>
> Can somebody tell me which library to link with ?
> I've already linked with :
> ITKCommon ITKNumerics ITKIO ITKMetaIO ITKAlgorithms
> ITKNrrdIO itkgdcm itkjpeg12 itkjpeg16 itkopenjpeg
> itkpng itktiff itkjpeg8 ITKSpatialObject ITKNumerics
> itkvnl_inst itkvnl_algo itkv3p_netlib itkvnl itkvcl
> pthread itksys dl ITKDICOMParser ITKEXPAT
> ITKniftiio ITKznz itkzlib -Wl itkvnl_algo itkv3p_netlib
>
> Thanks,
>
> Yan
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list