[Insight-users] Problems building version 1.2
Luis Ibanez
luis.ibanez@kitware.com
Mon, 17 Mar 2003 23:33:23 -0500
Hi Liang,
You shouldn't need to manually add paths for headers
in VC++. CMake will take care of all these details
when you provide it with the appropriate information.
It looks like when you are configuring the Applications
with CMake, you are not passing the apropriate directory
to the variable ITK_DIR. This variable expects to receive
the binary directory where ITK was built.
InsightApplications should build without having to modify
the VC++ project in any way.
If you continue experiencing problems, plase post the
CMakeCache.txt files (both from ITK and from ITK Applications)
to the list. These files are generated by CMake in the
binary directories of your builds,
Thanks
Luis
--------------------------------
liang@cs.toronto.edu wrote:
> Dear Luis Ibanez,
>
> Thank you very much for your email. Following your suggestion, I have
> successfully complied VTK 4.2.1 and Insight Toolkit 1.2.0 under MS
> Windows. However, I met some errors when building Insight Applications
> 1.2.0. with both USE_FLTK and USE_VTK "off" (to make things simple as
> my first step; eventually I will turn them on).
>
> The problem is that it cannot automatically find the header files, but
> I solved the problem by manually giving the directories in MS
> VC++. After it, I still had some errors (included below). I organized
> the files as follows:
>
> ITK
> ITK1.2
> InsightToolkit-1.2.0 (unzip from the download InsightToolkit-1.2.0.zip)
> InsightApplications-1.2.0 (unzip from the download InsightApplications-1.2.0.zip)
> ITK1.2bin
> InsightToolkit-1.2.0 (all the files generated by CMakeSetUp.exe for MS VC++
> from ITK1.2/InsightToolkit-1.2.0)
> InsightApplications-1.2.0 (all the files generated by CMakeSetUp.exe for MS VC++
> from ITK1.2/InsightApplications-1.2.0)
>
> Would you please let me know how I should organize the files to avoid all
> the problems I have, or how to solve the errors I have in some other ways?
>
> Many Thanks, Jianming Liang
>
> --------------------Configuration: itk2DAnisotropicDiffusionImageFilter - Win32 Debug--------------------
> Compiling...
> itk2DAnisotropicDiffusionImageFilter.cxx
> Linking...
> Creating library Debug/itk2DAnisotropicDiffusionImageFilter.lib and object Debug/itk2DAnisotropicDiffusionImageFilter.exp
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_destroy_read_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_create_info_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_create_read_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_sig_cmp
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_read_end
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_read_image
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_get_rowbytes
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_read_update_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_swap
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_tRNS_to_alpha
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_get_valid
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_gray_1_2_4_to_8
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_palette_to_rgb
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_get_IHDR
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_read_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_sig_bytes
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_init_io
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_get_sCAL
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_get_channels
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_write_end
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_write_image
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_write_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_sCAL
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_compression_level
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_set_IHDR
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_destroy_write_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol _png_create_write_struct
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external symbol _gzclose
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external symbol _gzread
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external symbol _gzopen
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external symbol _gzwrite
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall MetaImage::~MetaImage(void)" (??1MetaImage@@UAE@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "bool __cdecl MET_SystemByteOrderMSB(void)" (?MET_SystemByteOrderMSB@@YA_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: __thiscall MetaImage::MetaImage(void)" (??0MetaImage@@QAE@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: void __thiscall MetaImage::ElementDataFileName(char const *)" (?ElementDataFileName@MetaImage@@QAEXPBD@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: float __thiscall MetaObject::Position(int)const " (?Position@MetaObject@@QBEMH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: float __thiscall MetaObject::ElementSpacing(int)const " (?ElementSpacing@MetaObject@@QBEMH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: int __thiscall MetaImage::DimSize(int)const " (?DimSize@MetaImage@@QBEHH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: int __thiscall MetaObject::NDims(void)const " (?NDims@MetaObject@@QBEHXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: enum MET_ValueEnumType __thiscall MetaImage::ElementType(void)const " (?ElementType@MetaImage@@QBE?AW4MET_ValueEnumType@@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: int __thiscall MetaImage::ElementNumberOfChannels(void)const " (?ElementNumberOfChannels@MetaImage@@QBEHXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall MetaObject::BinaryData(void)const " (?BinaryData@MetaObject@@QBE_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall MetaImage::ElementByteOrderFix(void)" (?ElementByteOrderFix@MetaImage@@QAE_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall MetaImage::ElementDataFileName(void)const " (?ElementDataFileName@MetaImage@@QBEPBDXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: void __thiscall MetaObject::BinaryData(bool)" (?BinaryData@MetaObject@@QAEX_N@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: void __thiscall MetaObject::Position(float const *)" (?Position@MetaObject@@QAEXPBM@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall MetaImage::InitializeEssential(int,int const *,float const *,enum MET_ValueEnumType,int,void *,bool)" (?InitializeEssential@MetaImage@@QAE_NHPBHPBMW4M
> ET_ValueEnumType@@HPAX_N@Z)
> Debug/itk2DAnisotropicDiffusionImageFilter.exe : fatal error LNK1120: 47 unresolved externals
> Error executing link.exe.
>
> ALL_BUILD - 48 error(s), 0 warning(s)