[Insight-users] Simple client program question

Matt McCormick matt.mccormick at kitware.com
Fri Feb 1 16:55:24 EST 2013


On Fri, Feb 1, 2013 at 9:54 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Dave,
>
> This has come up before. If you have built ITK with
> Module_ITKVtkGlue:BOOL=ON, a client program needs to find VTK. If you
> know a way to solve this problem, oh great cmake guru, we would all
> appreciate it.

+1

>
> Bill
>
>
> On Fri, Feb 1, 2013 at 4:39 PM, David Cole <dlrdave at aol.com> wrote:
>> 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'
>>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list