[Insight-users] Problem compilation
M. Elena Martinez
elena at leibniz.iimas.unam.mx
Mon Sep 18 13:43:16 EDT 2006
Dear all,
I am trying to compile an example using FLTK.
I have 4 files AppGUI.cxx, AppBase.cxx, App.cxx and tha main.cxx
I manage to generate the 4 object files, but after that I have an
error, I guess wrote something wrong on the CMakeLists.txt when
linking the executable. The error is as follow:
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$ ccmake .
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$ cmake .
-- Check for working C compiler: gcc -- works
-- Check for working CXX compiler: c++ -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /home/elena/ProyectosITK/ICCH/RISA_ITK
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$ make
Building dependencies. cmake.depends...
Building object file main.o...
Building object file RisaAppGUI.o...
Building object file RisaAppBase.o...
Building object file RisaApp.o...
Building executable /home/elena/ProyectosITK/ICCH/RISA_ITK/RISA_ITK...
/usr/bin/ld: cannot find -lITKFltkImageViewer
collect2: ld returned 1 exit status
make[1]: *** [/home/elena/ProyectosITK/ICCH/RISA_ITK/RISA_ITK] Error 1
make: *** [default_target] Error 2
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$
------- My CMakeLists.txt is the next:
PROJECT(RISA_ITK)
# Look for FLTK
INCLUDE (${CMAKE_ROOT}/Modules/FindFLTK.cmake)
# and ITK
INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
INCLUDE(${USE_ITK_FILE})
ENDIF(USE_ITK_FILE)
SET(InsightApplications_SOURCE_DIR /home/elena/ITK/InsightApplications-2.2.0)
SET(InsightApplications_BINARY_DIR /home/elena/ITK/InsightApplications-2.2.0)
INCLUDE_DIRECTORIES( ${RISA_ITK_SOURCE_DIR} ${FLTK_INCLUDE_PATH}
${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer )
INCLUDE (${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer)
LINK_LIBRARIES(
# FLTK libraries
${FLTK_BASE_LIBRARY}
${FLTK_GL_LIBRARY}
${FLTK_FORMS_LIBRARY}
${FLTK_IMAGES_LIBRARY}
${FLTK_PLATFORM_DEPENDENT_LIBS}
ITKBasicFilters
ITKCommon
ITKIO
ITKNumerics
ITKMetaIO
ITKFltkImageViewer)
SET(
RISA_ITK_App_SRCS
RisaAppGUI
RisaAppBase
RisaApp)
ADD_EXECUTABLE(
RISA_ITK
main
${RISA_ITK_App_SRCS} )
----------------------
I would appreciate if somebody can help me to find the problem.
Regards,
Elena Martinez
More information about the Insight-users
mailing list