[ITK] Problem linking file 'ITKAlgorithms.lib' when using the 2D active shape model ITK
Matt McCormick
matt.mccormick at kitware.com
Thu Nov 27 22:17:55 EST 2014
Hi Charlotte,
Welcome to ITK!
The explicit list of ITK libraries (which have changed names in ITKv4
versus ITKv3) can be fixed by using ${ITK_LIBRARIES}. So,
TARGET_LINK_LIBRARIES (
2dasm
${ITK_LIBRARIES}
${VTK_LIBRARIES})
Hope this helps,
Matt
On Thu, Nov 27, 2014 at 10:17 PM, Matt McCormick
<matt.mccormick at kitware.com> wrote:
> Hi Charlotte,
>
> Welcome to ITK!
>
> The explicit list of ITK libraries (which have changed names in ITKv4
> versus ITKv3) can be fixed by using ${ITK_LIBRARIES}. So,
>
>
>
> On Thu, Nov 27, 2014 at 2:38 PM, Charlotte Xerneas <xerneas999 at gmail.com> wrote:
>> Hi,
>>
>> I'm pretty new to this forum, as well as to ITK. I hope you can helping me
>> out to make an existing ITK VC project work. I downloaded the source code
>> from
>> http://www.insight-journal.org/browse/publication/812.
>>
>> I used cmake and then tried to compile it in Visual Studio 2010. But I got
>> the error
>>
>> LINK : fatal error LNK1104: cannot open file 'ITKAlgorithms.lib'.
>>
>>
>> These are the options I used in CMake configure:
>>
>> CMAKE_BACKWARDS_COMPATIBILITY 2.4
>>
>> CMAKE_CONFIGURATION_TYPES: Debug;Release;MinSizeRel;RelWithDebInfo
>> CMAKE_INSTALL_PREFIX C:/Program Files (x86)/2dasm
>> EXECUTABLE_OUTPUT_PATH: E:/ITK/Create2DActiveShapeModel/dev10/excecutable
>> ITK_DIR: E:/ITK/ITK4.6-dev10
>> LIBRARY_OUTPUT_PATH: E:/ITK/Create2DActiveShapeModel/dev10/liboutput
>>
>> After I generated using CMake, both the executable_output_path and
>> library_output_path are empty.
>>
>> For you convenience, this is the cmake file I used:
>> PROJECT( 2dasm )
>>
>> CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
>> if(COMMAND cmake_policy)
>> cmake_policy(SET CMP0003 NEW)
>> endif(COMMAND cmake_policy)
>>
>> FIND_PACKAGE ( ITK )
>> IF ( ITK_FOUND )
>> INCLUDE( ${USE_ITK_FILE} )
>> ENDIF( ITK_FOUND )
>>
>>
>> INCLUDE_DIRECTORIES(${imfilter_SOURCE_DIR})
>>
>> ADD_EXECUTABLE( 2dasm 2dasm.cxx )
>>
>> TARGET_LINK_LIBRARIES (
>> 2dasm
>> ITKAlgorithms
>> ITKBasicFilters
>> ITKCommon
>> ITKIO
>> ITKNumerics
>> ITKSpatialObject
>> ${VTK_LIBRARIES})
>>
>>
>> Please help me identify what have I done wrong.
>>
>> Many thanks,
>> Charlotte
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>>
More information about the Community
mailing list