[Insight-users] Re: Fltk 2.0 Problem

Luis Ibanez luis.ibanez at kitware.com
Wed, 25 Feb 2004 12:00:19 -0500


Hi Andy,

For almost any software, a change in the major
release number implicitly states that backward
compatibility is not guarranteed.

However, the apropriate list to ask a question
about this issue is the FLTK-users list.   :-)


InsightApplications is not supporting FLTK 2.0.
The official versions are FLTK 1.1.4, and VTK 4.2.

Note that ITK itself does NOT depends on FLTK
nor VTK. Only the demos in InsightApplications do.


---


Being pragmatic, the easy way to solve your problem
is to look at the Makefiles that you get for the
demo examples of FLTK and check what libraries are
included in the link command.

Then, go to your CMakeList.txt file and add those
libraries on the command:


       TARGET_LINK_LIBRARIES()



The definite solution to this issues will be to
CMake-fy FLTK. We are anxiously hopping for that
day to come.


Please let us know if you have any other questions.


   Thanks


     Luis



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

Andy Eow wrote:

> Hi Luis,
>  
> I've just installed fltk-2.0 and am trying to integrate this with an 
> existing itk application. Hence, I'm still using the CMake platform to 
> generate the makefiles. However, I'm getting the following undefined 
> references: 
>  
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x146): In function 
> `fontopen(char const*, int, bool)':
> : undefined reference to `XftFontOpen'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x4d0): In function 
> `fltk::getwidth(char const*, int)':
> : undefined reference to `XftTextExtents8'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x504): In function 
> `fltk::Drawable::free_gc()':
> : undefined reference to `XftDrawDestroy'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x561): In function 
> `fltk::drawtext_transformed(char const*, int, float, float)':
> : undefined reference to `XftDrawSetClip'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x685): In function 
> `fltk::drawtext_transformed(char const*, int, float, float)':
> : undefined reference to `XftDrawString8'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x6c4): In function 
> `fltk::drawtext_transformed(char const*, int, float, float)':
> : undefined reference to `XftDrawCreate'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x6db): In function 
> `fltk::drawtext_transformed(char const*, int, float, float)':
> : undefined reference to `XftDrawSetClip'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x7c5): In function 
> `fltk::list_fonts(fltk::Font**&)':
> : undefined reference to `XftListFonts'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x810): In function 
> `fltk::list_fonts(fltk::Font**&)':
> : undefined reference to `FcPatternGetString'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x82a): In function 
> `fltk::list_fonts(fltk::Font**&)':
> : undefined reference to `FcFontSetDestroy'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x920): In function 
> `fltk::Font::sizes(int*&)':
> : undefined reference to `XftListFonts'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x990): In function 
> `fltk::Font::sizes(int*&)':
> : undefined reference to `FcPatternGetDouble'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0x9ed): In function 
> `fltk::Font::sizes(int*&)':
> : undefined reference to `FcFontSetDestroy'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0xa7d): In function 
> `fltk::Font::encodings(char const**&)':
> : undefined reference to `XftListFonts'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0xaed): In function 
> `fltk::Font::encodings(char const**&)':
> : undefined reference to `FcPatternGetString'
> /usr/local/lib/libfltk.a(fl_font.o)(.text+0xb31): In function 
> `fltk::Font::encodings(char const**&)':
> : undefined reference to `FcFontSetDestroy'
> /usr/local/lib/libfltk.a(Fl.o)(.text+0xaa0): In function 
> `fltk::Monitor::list(fltk::Monitor const**)':
> : undefined reference to `XineramaQueryExtension'
> /usr/local/lib/libfltk.a(Fl.o)(.text+0xc15): In function 
> `fltk::Monitor::list(fltk::Monitor const**)':
> : undefined reference to `XineramaQueryScreens'
>  
> This error is similar to the previous ones that I was getting (fltk 
> libraries not found) but I'm not sure what libraries I have to include 
> now. It's primarily the functions in the Xft package coupled with 
> FcPatternGetString & XineramaQueryScreens. How should I change my 
> CMakeLists.txt?
>  
> On a side note, I've noticed that fltk-2.0 no longer works with 
> fltkImage2DViewer, gives some compile errors that wasn't a problem with 
> fltk-1.2 ...  so 2.0 is not backward compatible?
>  
> Thanks!!
>  
> Cheers,
> Andy
>