[ITK] Problem linking file 'ITKAlgorithms.lib' when using the 2D active shape model ITK

Charlotte Xerneas xerneas999 at gmail.com
Thu Nov 27 14:38:25 EST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20141127/2212ce2e/attachment.html>


More information about the Community mailing list