[Insight-users] Re: FltkImageViewer Problem

Luis Ibanez luis.ibanez at kitware.com
Tue, 17 Feb 2004 03:16:00 -0500


Hi Andy,

You are missing to include the configuration
for FLTK. Please add the following lines to
your CMakeLists.txt file:


    FIND_PACKAGE(FLTK)
    IF(FLTK_FOUND)
      INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
    ENDIF(FLTK_FOUND)

then rerun CMake and provide the locations
of all 6 FLTK components.

Please look at the FAQ for details

http://www.itk.org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq03.005.htp



Regards,



    Luis



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

Andy Eow wrote:

> Hi Luis,
> 
> I'm interested in writing a modified version of the DicomImageViewer that
> comes with ITKApplications and hence want to copy the existing files into a
> separate directory [/home/Code/DICOMViewer] for reference. However, I have
> not been able to get DicomImageViewer to compile in the new directory after
> copying. Read a previous post with the subject [Insight-users] Re:
> /usr/bin/ld: cannot find -lITKFltkImageViewer and added the few lines to my
> CMakeList.txt. Solved a few problems but gives the following error now:
> 
> Building dependencies. cmake.depends...
> -- Using Buildname: Linux-i686-pc-linux-gnu-g++
> -- Loading VTK CMake commands
> -- Loading VTK CMake commands - done
> Building object file DicomImageViewer.o...
> Building executable /home/Code/DICOMViewer/DicomImageViewer...
> DicomImageViewer.o(.text+0xc8): In function `main':
> : undefined reference to `fl_file_chooser(char const*, char const*, char
> const*, int)'
> DicomImageViewer.o(.text+0x2c3): In function `main':
> : undefined reference to `Fl::run()'
> DicomImageViewer.o(.gnu.linkonce.t._ZN4fltk13Image2DViewerIfE8SetImageEPKN3i
> tk5ImageIfLj2EEE+0x294): In function
> `fltk::Image2DViewer<float>::SetImage(itk::Image<float, (unsigned)2>
> const*)':
> : undefined reference to `Fl_Valuator::value(double)'
> DicomImageViewer.o(.gnu.linkonce.t._ZN4fltk13Image2DViewerIfE8SetImageEPKN3i
> tk5ImageIfLj2EEE+0x2ac): In function
> `fltk::Image2DViewer<float>::SetImage(itk::Image<float, (unsigned)2>
> const*)':
> : undefined reference to `Fl_Valuator::value(double)'
> DicomImageViewer.o(.gnu.linkonce.t._ZN4fltk13Image2DViewerIfE11RenderImageEd
> d+0x3c6): In function `fltk::Image2DViewer<float>::RenderImage(double,
> double)':
> : undefined reference to `Fl_Widget::redraw()'
> DicomImageViewer.o(.gnu.linkonce.t._ZN4fltk13Image2DViewerIfE11RenderImageEd
> d+0x3cb): In function `fltk::Image2DViewer<float>::RenderImage(double,
> double)':
> : undefined reference to `Fl::check()'
> /home/InsightToolkit-1.4.0/Applications/InsightApplications/Auxiliary/FltkIm
> ageViewer/libITKFltkImageViewer.a(fltkImage2DViewerGUI.o)(.text+0x23b): In
> function `fltkImage2DViewerGUI::fltkImage2DViewerGUI[not-in-charge]()':
> : undefined reference to `Fl_Group::end()'
> 
> The list of errors go on pretty long so I've only attached a sample here.
> I'm pretty sure that the necessary libraries are present because I was able
> to compile and run the DicomImageViewer that came with ITK. I'm guessing
> it's a path problem but I'm not too sure how to go about solving it. Please
> advise.
> 
> Thank you very much.
> 
> Cheers,
> Andy
> 
> 
>