[Insight-users] Compiling ITK on Windows

Luis Ibanez luis.ibanez@kitware.com
Tue, 04 Mar 2003 13:13:56 -0500


Hi Raghavendra,

Your CMakeLists.txt file looks good.

In principle ITKIO should pull itkpng and itkzlib, but...
since all the unresolved symbols are related with PNG,
we may suspect that itkpng is not being added to the
link line.

Pleawse try adding "itkpng" and "itkzlib" to your CMakeLists.txt
file, something like the following line should do it:

TARGET_LINK_LIBRARIES(ITKGIPLImageTest
ITKIO
ITKCommon
ITKMetaIO
VXLNumerics
itkpng
itkzlib
)

Also,
just being a bit paranoid, could you please go to the
"bin" directory inside the binary directory where you build ITK
and verify that "itkpng.lib" and "itkzlib.lib" are there ?

and... being even more paranoid:

did you moved the binary directory after finishing building ITK ?


-----


Please let us know if that helps...  or not.


   Thanks


     Luis



--------------------------------------------------
Raghavendra Chandrashekara wrote:
> Sorry I meant to send the CMakeLists.txt file instead of the CMakeCache.txt
> file.
> 
> Thanks,
> 
> Raghavendra
> 
> ----- Original Message -----
> From: "Raghavendra Chandrashekara" <rc3@doc.ic.ac.uk>
> To: "Luis Ibanez" <luis.ibanez@kitware.com>
> Cc: <insight-users@public.kitware.com>
> Sent: Tuesday, March 04, 2003 5:04 PM
> Subject: Re: [Insight-users] Compiling ITK on Windows
> 
> 
> 
>>Hi Luis,
>>
>>Thanks for your quick reply!
>>
>>
>>>It looks like you are opening the .dsp
>>>project in Testing directly instead of
>>>loading the main .dsw file.
>>>
>>>It this the case ?
>>
>>No, I opened the ITK.sln file that is created in the build directory. I
>>think that's the correct file to open isn't it? When I built the solution,
>>all of the libraries where built properly. It was just the test projects
>>which didn't succeed. There were some linking errors with the png library.
>>
>>The reason I am using the CVS version of ITK is because I want to use the
>>GIPL image readers which are not in the current release. I've written a
>>small program which reads a GIPL image and writes it out again. I've
>>attached the source code for the program and the CMakeLists.txt file. I
>>think they are correct but there is still the linking problem.
>>
>>Thanks,
>>
>>Raghavendra
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>PROJECT(ITKGIPLImageTest)
>>
>>INCLUDE(${CMAKE_ROOT}/Modules/FindITK.cmake)
>>IF (USE_ITK_FILE)
>>	INCLUDE(${USE_ITK_FILE})
>>ENDIF (USE_ITK_FILE)
>>
>>ADD_EXECUTABLE(ITKGIPLImageTest ITKGIPLImageTest.cxx)
>>
>>IF (WIN32)
>>	TARGET_LINK_LIBRARIES(ITKGIPLImageTest ITKIO ITKCommon ITKMetaIO VXLNumerics)
>>ELSE (WIN32)
>>	TARGET_LINK_LIBRARIES(ITKGIPLImageTest ITKIO ITKCommon ITKMetaIO VXLNumerics dl pthread)
>>ENDIF (WIN32)
>