[Insight-users] Simple client program question

David Cole dlrdave at aol.com
Fri Feb 1 16:39:32 EST 2013


Simple ITK client program CMakeLists.txt file:
===========================================
  cmake_minimum_required(VERSION 2.8)
  project(itkClient)

  find_package(ITK 4.4)
  include(${ITK_USE_FILE})

  add_executable(itkClient itkClientMain.cxx)
  target_link_libraries(itkClient ${ITK_LIBRARIES})

Question:
===========================================
Should I have to mention VTK in this CMakeLists.txt file if I built ITK:
  with static libraries, -DBUILD_SHARED_LIBS:BOOL=OFF,
  and -DModule_ITKVtkGlue:BOOL=ON,
  and I am trying to link itkClient against the *install* tree of ITK?

Or should it be optional/not-required, or automatically handled if it is required?

(right now, in 'master', it appears to be required, with CMake 2.8.10.2, even if itkClient does not do any VTK stuff... I get the linker error pasted below about "vtksys.lib"... ITK_LIBRARIES does not include "vtksys")


Thanks,
David


Linker error
===========================================
3: Run Build Command:ninja
3: [1/2] Building CXX object CMakeFiles\itkClient.dir\itkClientMain.cxx.obj
3: [2/2] Linking CXX executable itkClient.exe
3: FAILED: cmd.exe /c cd . && "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MICROS~1.0\VC\
bin\cl.exe  /nologo  /DWIN32 /D_WINDOWS /W3 /Zm1000 /GR /EHsc  /bigobj /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FeitkClient.exe
 /FditkClient.pdb @CMakeFiles/itkClient.rsp /link /implib:itkClient.lib /version:0.0  /STACK:10000000 /machine:X86   /de
bug /INCREMENTAL /subsystem:console  && cd .
3: LINK : fatal error LNK1104: cannot open file 'vtksys.lib'


ITK_LIBRARIES
===========================================
ITK_LIBRARIES='itksys;itkvnl_algo;itkvnl;itkv3p_netlib;ITKCommon;itkNetlibSlatec;ITKStatistics;ITKIOImageBase;ITKMesh;itkzlib;ITKMetaIO;ITKSpatialObjects;ITKPath;ITKLabelMap;ITKQuadEdgeMesh;ITKOptimizers;ITKPolynomials;ITKBiasCorrection;ITKBioCell;ITKDICOMParser;ITKEXPAT;ITKIOXML;ITKIOSpatialObjects;ITKFEM;itkopenjpeg;gdcmDICT;gdcmMSFF;ITKznz;ITKniftiio;ITKgiftiio;itkhdf5_cpp;itkhdf5;ITKIOBMP;ITKIOBioRad;ITKIOCSV;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;itkjpeg;ITKIOJPEG;itktiff;ITKIOTIFF;ITKIOLSM;ITKIOMesh;ITKIOMeta;ITKIONIFTI;ITKNrrdIO;ITKIONRRD;itkpng;ITKIOPNG;ITKIOSiemens;ITKIOStimulate;ITKIOTransformBase;ITKIOTransformHDF5;ITKIOTransformInsightLegacy;ITKIOTransformMatlab;ITKIOVTK;ITKKLMRegionGrowing;ITKOptimizersv4;ITKVTK;ITKWatersheds;ITKReview;ITKVideoCore;ITKVideoIO;ITKVtkGlue'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130201/e1cbb322/attachment.htm>


More information about the Insight-users mailing list