[Insight-users] FLTK image viewer: link failed

Flavio flseixas at yahoo.com.br
Thu Oct 12 11:22:22 EDT 2006


Hi All,

 

I’m trying to compile an ITK application called (FastMarchingImageFilter)
using FLTK image viewer, in spite of getting compile, I’ve got the following
link fail messages:

 

What should I try? Any doubt will be welcome.

 

Thank you,

Flávio.

Universidade Federal Fluminense

Niterói - Brazil

 

Scanning dependencies of target FastMarchingImageFilter

[100%] Building CXX object
CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o

Linking CXX executable FastMarchingImageFilter

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN4fltk11ImageViewerIhhEC1Ev+0xe): In function
`fltk::ImageViewer<unsigned char, unsigned char>::ImageViewer()':

: undefined reference to `fltkImageViewerGUI::fltkImageViewerGUI()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN4fltk11ImageViewerIhhEC1Ev+0x2f): In function
`fltk::ImageViewer<unsigned char, unsigned char>::ImageViewer()':

: undefined reference to `fltkImageViewerGUI::CreateGUI()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN4fltk11ImageViewerIhhEC1Ev+0x45): In function
`fltk::ImageViewer<unsigned char, unsigned char>::ImageViewer()':

: undefined reference to `fltkImageViewerGUI::~fltkImageViewerGUI()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN4fltk11ImageViewerIhhED1Ev+0x16): In function
`fltk::ImageViewer<unsigned char, unsigned char>::~ImageViewer()':

: undefined reference to `fltkImageViewerGUI::~fltkImageViewerGUI()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.r._ZTVN4fltk11ImageViewerIhhEE+0x14): undefined reference to
`fltkImageViewerGUI::AddMenuBarOptions()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.r._ZTVN4fltk11ImageViewerIhhEE+0x18): undefined reference to
`fltkImageViewerGUI::AddFilterMenuOptions()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.r._ZTVN4fltk11ImageViewerIhhEE+0x1c): undefined reference to
`fltkImageViewerGUI::AddFileMenuOptions()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN4fltk11ImageViewerIhhED0Ev+0x16): In function
`fltk::ImageViewer<unsigned char, unsigned char>::~ImageViewer()':

: undefined reference to `fltkImageViewerGUI::~fltkImageViewerGUI()'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.r._ZTIN4fltk11ImageViewerIhhEE+0x8): undefined reference to `typeinfo for
fltkImageViewerGUI'

CMakeFiles/FastMarchingImageFilter.dir/FastMarchingImageFilter.o(.gnu.linkon
ce.t._ZN3itk9SliceViewIhE6handleEi+0x180c): In function
`itk::SliceView<unsigned char>::handle(int)':

: undefined reference to `ifuShowText(char const*)'

collect2: ld returned 1 exit status

make[2]: ** [FastMarchingImageFilter] Erro 1

make[1]: ** [CMakeFiles/FastMarchingImageFilter.dir/all] Erro 2

make: ** [all] Erro 2

 

----------------------------------------------------------------------------
-----------------------------    

CMakelists.txt code:

----------------------------------------------------------------------------
-----------------------------    

PROJECT(ImageSegmentation)

 

# first we have to find VTK

FIND_PACKAGE(VTK)

IF(VTK_FOUND)

  INCLUDE(${VTK_USE_FILE})

ENDIF(VTK_FOUND)

 

# first we have to find ITK

FIND_PACKAGE(ITK)

IF(ITK_FOUND)

  INCLUDE(${ITK_USE_FILE})

ENDIF(ITK_FOUND)

 

# then FLTK

FIND_PACKAGE(FLTK)

IF(FLTK_FOUND)

 INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})

ENDIF(FLTK_FOUND)

 

SET(InsightApplications_SOURCE_DIR
/home/flavio/InsightApplications2-8-1/InsightApplications)

SET(InsightApplications_BINARY_DIR /home/flavio/InsightApplications-binary)

 

INCLUDE_DIRECTORIES(

  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer

  ${InsightApplications_SOURCE_DIR}/Auxiliary/VtkFltk

  ${InsightApplications_SOURCE_DIR}/Auxiliary/vtk

  ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer

  ${InsightApplications_BINARY_DIR}/Auxiliary/VtkFltk

)

 

SET(APPLICATION_SOURCES

  FastMarchingImageFilter

  )

 

ADD_EXECUTABLE(FastMarchingImageFilter ${APPLICATION_SOURCES})

 

TARGET_LINK_LIBRARIES(FastMarchingImageFilter

    ITKIO ITKBasicFilters ITKNumerics ITKCommon 

    vtkRendering vtkGraphics vtkHybrid vtkImaging 

    vtkIO vtkFiltering vtkCommon 

    ${FLTK_LIBRARIES}

    )

----------------------------------------------------------------------------
-----------------------------    

The .cxx code:

----------------------------------------------------------------------------
-----------------------------    

typedef fltk::ImageViewer<InputPixelType, OverlayPixelType>
InternalImageViewerType;

InternalImageViewerType m_InputImageViewer;

 

m_InputImageViewer.SetImage(reader->GetOutput());

m_InputImageViewer.Show();

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061012/e13e0a5f/attachment.html


More information about the Insight-users mailing list