[Insight-users] ITK with VS 10 Win64

Gib Bogle g.bogle at auckland.ac.nz
Sat Jan 7 21:15:37 EST 2012


I have been building a program using ITK-3.20.0,  32-bit with VS8 and 64-bit 
with mingw64.  I have now installed and built ITK-4.0.0 with VS10 Win64.  All 
seems OK, but when I try to build my program with VS10 I get a link error: 
cannot open input file 'ITKIO.lib'.

CMakeLists.txt is unchanged:

PROJECT(threshold)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR
"ITK not found. Please set ITK_DIR.")
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(threshold threshold.cpp)
TARGET_LINK_LIBRARIES(threshold ITKCommon ITKIO )

I see that both the ITK directory structure and the file naming have been 
changed significantly since 3.20.0.  Whereas before the library files were in 
bin\release, now they are in lib\release, and now the version number is attached 
to the file names, e.g. there is ITKCommon-4.0.lib.  Nowhere can I find a file 
called ITKIO-4.0.lib, although there are many files of the form ITKIO***.lib.

How should I modify CMakeLists.txt to build my program with VS10 Win64 on 
Windows 7?

Thanks
Gib


More information about the Insight-users mailing list