[ITK] Read image example issue
Med SWEng
medcompsweng at gmail.com
Fri Apr 25 19:09:47 EDT 2014
I knew the issue.
- I forgot to run cmake after doing the modifications
- I had to have this line in CMakeLists.txt:
TARGET_LINK_LIBRARIES(ReadImage ${ITK_LIBRARIES}) based on here:
http://marc.info/?l=insight-users&m=132683781806781&w=2
Thanks.
On Sat, Apr 26, 2014 at 12:30 AM, Med SWEng <medcompsweng at gmail.com> wrote:
> I tried building the "read image" example in the ITK software guide, but
> got the following:
>
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::NiftiImageIOFactoryRegister__Private(void)"
> (?NiftiImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::NrrdImageIOFactoryRegister__Private(void)"
> (?NrrdImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::GiplImageIOFactoryRegister__Private(void)"
> (?GiplImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::HDF5ImageIOFactoryRegister__Private(void)"
> (?HDF5ImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::JPEGImageIOFactoryRegister__Private(void)"
> (?JPEGImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::GDCMImageIOFactoryRegister__Private(void)"
> (?GDCMImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::BMPImageIOFactoryRegister__Private(void)"
> (?BMPImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::LSMImageIOFactoryRegister__Private(void)"
> (?LSMImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::PNGImageIOFactoryRegister__Private(void)"
> (?PNGImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::TIFFImageIOFactoryRegister__Private(void)"
> (?TIFFImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::VTKImageIOFactoryRegister__Private(void)"
> (?VTKImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::StimulateImageIOFactoryRegister__Private(void)"
> (?StimulateImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::BioRadImageIOFactoryRegister__Private(void)"
> (?BioRadImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::MetaImageIOFactoryRegister__Private(void)"
> (?MetaImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl
> itk::MRCImageIOFactoryRegister__Private(void)"
> (?MRCImageIOFactoryRegister__Private at itk@@YAXXZ)
> 2>ReadImage.obj : error LNK2019: unresolved external symbol "public:
> static class std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > __cdecl
> itk::ImageIOBase::GetComponentTypeAsString(enum
> itk::ImageIOBase::IOComponentType)" (?GetComponentTypeAsString at ImageIOBase
> @itk@@SA?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
> @W4IOComponentType at 12@@Z) referenced in function "protected: void
> __thiscall itk::ImageFileReader<class itk::Image<unsigned char,3>,class
> itk::DefaultConvertPixelTraits<unsigned char> >::DoConvertBuffer(void
> *,unsigned int)" (?DoConvertBuffer@?$ImageFileReader at V?$Image at E$02 at itk
> @@V?$DefaultConvertPixelTraits at E@2@@itk@@IAEXPAXI at Z)
> 2>ReadImage.obj : error LNK2019: unresolved external symbol "public:
> static class itk::SmartPointer<class itk::ImageIOBase> __cdecl
> itk::ImageIOFactory::CreateImageIO(char const *,enum
> itk::ImageIOFactory::FileModeType)" (?CreateImageIO at ImageIOFactory@itk@
> @SA?AV?$SmartPointer at VImageIOBase@itk@@@2 at PBDW4FileModeType@12@@Z)
> referenced in function __catch$?GenerateOutputInformation@
> ?$ImageFileReader at V?$Image at E$02 at itk@@V?$DefaultConvertPixelTraits at E@2@
> @itk@@UAEXXZ$0
> 2>C:\Users\Abder-Rahman\Desktop\Hermes Medical Solutions\itk
> training\ReadImage\bin\Debug\ReadImage.exe : fatal error LNK1120: 17
> unresolved externals
> 3>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32
> ------
> 3>Project not selected to build for this solution configuration
> ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========
>
> What should I do in this case?
>
> Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140426/c83a68dd/attachment-0002.html>
More information about the Community
mailing list