[CMake] How to add the library?

王琪 qi-wang02 at mails.thu.edu.cn
Thu Feb 16 19:21:11 EST 2006


The error messages I have gotten is :
Linking...
LINK : fatal error LNK1104: cannot open file "ITKBasicFilters.lib"
Error executing link.exe.

ALL_BUILD - 1 error(s), 0 warning(s)
My project's location is D:\2. My ITK project's location is D:\ITK\itk 2.2.0\InsightToolkit-2.2.0. My VTI project's location is D:\vtk.


> ------------------------------
> 
> Message: 4
> Date: Thu, 16 Feb 2006 09:56:07 -0500
> From: "William A. Hoffman" <billlist at nycap.rr.com>
> Subject: Re: [CMake] How to add the library?
> To: ?? <qi-wang02 at mails.thu.edu.cn>,	cmake at cmake.org
> Message-ID: <6.2.3.4.2.20060216095447.0a604d60 at pop.nycap.rr.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> At 07:58 AM 2/16/2006, =?gb2312?b?zfXn9w==?= wrote:
> >Hello,
> >  I want to creat my project with both itk and vtk.
> >  My CMakelists is as follows:
> >  PROJECT(myProject)
> >FIND_PACKAGE ( ITK)
> >IF ( ITK_FOUND)
> >INCLUDE( ${USE_ITK_FILE} )
> >ENDIF( ITK_FOUND)
> >FIND_PACKAGE ( VTK)
> >IF ( VTK_FOUND)
> >INCLUDE( ${USE_VTK_FILE} )
> >ENDIF( VTK_FOUND)
> >INCLUDE_DIRECTORIES(
> >${myProject_SOURCE_DIR}
> >)
> >INCLUDE_DIRECTORIES(
> >${ITK_SOURCE_DIR}/Code/Commom
> >)
> >
> >ADD_EXECUTABLE( myProject myProject.cxx)
> >TARGET_LINK_LIBRARIES ( myProject
> >ITKBasicFilters ITKCommon ITKIO
> >vtkRendering vtkGraphics vtkHybrid
> >vtkImaging vtkIO vtkFiltering vtkCommon
> >)
> >
> >  I create a new clean directory, but it cann't find all the libs. How can I add the libraries? 
> >  Thanks.
> You need to describe your problem in more detail, the cmake file looks good,
> but you may be missing libraries that your program uses.  Exactly what error
> messages are you getting?
> 
> -Bill
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> End of CMake Digest, Vol 22, Issue 25
> *************************************




More information about the CMake mailing list