[Insight-users] Error reading libraries

Martin Groher groher at in.tum.de
Thu Mar 10 04:36:25 EST 2005


Hi Rosario,

Have you told CMake where to find the libraries using 

LINK_DIRECTORIES( <path_to_lib> ) ?

The CMake command INCLUDE_DIRECTORIES(...) just tells the compiler where to
find the header files, not the .lib for linking.

Martin

---------------------------------------------------------------
Martin Groher
Chair for Computer Aided Medical Procedures (CAMP)
Lehrstuhl für Informatikanwendungen in der Medizin
Institut für Informatik I16
TU München
fon: +49 89 289-17071
mail: groher at in.tum.de

> -----Original Message-----
> From: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org]
> On Behalf Of Rosario Sance Garzón
> Sent: Tuesday, March 08, 2005 11:45 AM
> To: insight-users at itk.org
> Subject: [Insight-users] Error reading libraries
> 
> Hi all,
> 
> I have read similar questions before, but after making the changes
> that were advised, I couldn´t achieve to solve my problem.
> I´m working with ITK-2.0.0, VTK, MC Visual C++ and CMake 2.0. I made
> the installation successfully, and it seemed work.
> But now I am testing the project described at the
> GettingStarted-II.pdf guide, and I have the following warning:
> 
> <<LINK : fatal error LNK1104: cannot open file "ITKBasicFilters.lib"
> Error executing link.exe.
> 
> ALL_BUILD - 1 error(s), 0 warning(s)>>
> 
> I have tried to include the subdirectories where the libraries are, in
> the CMakeLists.txt, so I have written:
> 
> <<.....
> SET(InsightToolkit_SOURCE_DIR "C:/Archivos de
> programa/CMake/ITK-2.0.0/InsightToolkit-2.0.0")
> SET(InsightToolkit_BINARY_DIR "F:/itk_depurado")
> ..............
> 
> INCLUDE_DIRECTORIES(${myProject2_SOURCE_DIR})
> INCLUDE_DIRECTORIES(${InsightToolkit_BINARY_DIR}/bin/Debug)
> INCLUDE_DIRECTORIES(${InsightToolkit_SOURCE_DIR}/Code)
> INCLUDE_DIRECTORIES(${InsightApplications_SOURCE_DIR}/Auxiliary/vtk)
> INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Rendering)
> 
> ADD_EXECUTABLE( myProject2 myProject2.cxx)
> TARGET_LINK_LIBRARIES ( myProject2 ITKCommon ITKBasicFilters ITKIO
> vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO vtkFiltering
> vtkCommon)
> .........>>
> 
> But the problem persists. How somebody tell me why can´t the program
> read the libraries? What is wrong?
> 
> Thanks a lot in advance.
> Rosario
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list