<div dir="ltr"><div><div><div>I knew the issue.<br><br></div>- I forgot to run cmake after doing the modifications<br></div>- I had to have this line in CMakeLists.txt: TARGET_LINK_LIBRARIES(ReadImage ${ITK_LIBRARIES}) based on here: <a href="http://marc.info/?l=insight-users&m=132683781806781&w=2">http://marc.info/?l=insight-users&m=132683781806781&w=2</a><br>
<br></div>Thanks.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 26, 2014 at 12:30 AM, Med SWEng <span dir="ltr"><<a href="mailto:medcompsweng@gmail.com" target="_blank">medcompsweng@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I tried building the "read image" example in the ITK software guide, but got the following:<br>
<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::NiftiImageIOFactoryRegister__Private(void)" (?NiftiImageIOFactoryRegister__Private@itk@@YAXXZ)<br>
2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::NrrdImageIOFactoryRegister__Private(void)" (?NrrdImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::GiplImageIOFactoryRegister__Private(void)" (?GiplImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::HDF5ImageIOFactoryRegister__Private(void)" (?HDF5ImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::JPEGImageIOFactoryRegister__Private(void)" (?JPEGImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::GDCMImageIOFactoryRegister__Private(void)" (?GDCMImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::BMPImageIOFactoryRegister__Private(void)" (?BMPImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::LSMImageIOFactoryRegister__Private(void)" (?LSMImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::PNGImageIOFactoryRegister__Private(void)" (?PNGImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::TIFFImageIOFactoryRegister__Private(void)" (?TIFFImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::VTKImageIOFactoryRegister__Private(void)" (?VTKImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::StimulateImageIOFactoryRegister__Private(void)" (?StimulateImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::BioRadImageIOFactoryRegister__Private(void)" (?BioRadImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::MetaImageIOFactoryRegister__Private(void)" (?MetaImageIOFactoryRegister__Private@itk@@YAXXZ)<br>2>ReadImage.obj : error LNK2001: unresolved external symbol "void __cdecl itk::MRCImageIOFactoryRegister__Private(void)" (?MRCImageIOFactoryRegister__Private@itk@@YAXXZ)<br>

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@ImageIOBase@itk@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4IOComponentType@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@V?$Image@E$02@itk@@V?$DefaultConvertPixelTraits@E@2@@itk@@IAEXPAXI@Z)<br>

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@ImageIOFactory@itk@@SA?AV?$SmartPointer@VImageIOBase@itk@@@2@PBDW4FileModeType@12@@Z) referenced in function __catch$?GenerateOutputInformation@?$ImageFileReader@V?$Image@E$02@itk@@V?$DefaultConvertPixelTraits@E@2@@itk@@UAEXXZ$0<br>

2>C:\Users\Abder-Rahman\Desktop\Hermes Medical Solutions\itk training\ReadImage\bin\Debug\ReadImage.exe : fatal error LNK1120: 17 unresolved externals<br>3>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------<br>

3>Project not selected to build for this solution configuration <br>========== Build: 1 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========<br><br></div>What should I do in this case?<br><br>Thanks.<br></div>
</blockquote></div><br></div>