[Insight-developers] Can't find itkpng.lib; don't need it anyway.

Mark Foskey mark_foskey@unc.edu
Fri, 13 Sep 2002 10:53:26 -0400


When I try to compile using the .dsw file from the CMakeLists.txt file 
appended below, I get the message:

LINK : fatal error LNK1181: cannot open input file "itkpng.lib"

This is puzzling since I'm not using itkpng.lib.

I assume that a workaround for the problem is to add the appropriate 
directory under LINK_DIRECTORIES, but I don't think users should need 
to do that explicitly, at least if they're not explicitly requesting 
itkpng.lib.

Also, I had to add the "Debug" at the end of 
${ITK_BINARY_DIR}/Code/IO/Debug to avoid an error, and that doesn't 
seem right eiter.

Are these the right behaviors?

The CMakeLists.txt file:

PROJECT(DicomMod)

# Find ITK
INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
   INCLUDE (${USE_ITK_FILE})
ENDIF (USE_ITK_FILE)

#indicate directores and libraries

INCLUDE_DIRECTORIES(
${ITK_SOURCE_DIR}/Code/IO
)

LINK_DIRECTORIES(
${ITK_BINARY_DIR}/Code/IO/Debug
)

LINK_LIBRARIES (
ITKIO
)

#specify executables
ADD_EXECUTABLE(itkDicomImageIOTest itkDicomImageIOTest)


-- 
Mark Foskey    (919) 843-5436  Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu            Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey  Chapel Hill, NC  27599-7515