[Insight-users] Re: FLTK and ITK on Mac OS X: Fl::error

Phillip Cheng pmcheng@u.washington.edu
Sat, 8 Mar 2003 11:00:02 -0800


Hi Luis,

Your paranoid thought was correct!  I fixed the problem by rearranging 
the last few lines of FindFLTK.cmake from

IF(FLTK_FOUND)
   SET(FLTK_LIBRARIES ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
                      ${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY}
                      ${FLTK_PLATFORM_DEPENDENT_LIBS})
ENDIF(FLTK_FOUND)

to

IF(FLTK_FOUND)
   SET(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS}
                      ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
                      ${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY})
ENDIF(FLTK_FOUND)

And mirabile dictu, it just works!  I'll leave it to the gurus to 
fathom why.

Now all I have to do is apply the 'Rez Carbon.r' fix.  Perhaps someday 
this can be made automatic?

By the way, for clarification, there was a typo in your previous 
message.  The declaration in Fl/Fl.h is
static void (*error)(const char*, ...);

I am using fltk-1.1.3, built on the Mac.

Thanks again,

Phillip


On Saturday, March 8, 2003, at 07:42  AM, Luis Ibanez wrote:

>
>
> Hi Phillip,
>
> This is quite interesting...
>
>
> What version of FLTK are you using ?
> Did you build it in the MAC ?
>
> Could you please make a "grep" for
> Fl::error in the FLTK source file ?
>
> In fltk-1.1.3 this symbol is declared
> in the file
>
>            Fl/Fl.h
>
> as
>
> void (*Fl::error)(const char* format, ...) = ::error;
>
>
> and then it is initialized in
>
>               Fl_abort.cxx
>
> as:
>
> void (*Fl::error)(const char* format, ...) = ::error;
>
>
> ----
>
> Pananoid thought:
>
>     It may also be the order of libraries in the link
>     line... you could try changing this order in the
>     FindFLTK.cmake file in InsightApplications/
>
>
> ----
>
> I don't see any common characteristic among the applications
> that are not building.... this sounds more like a fundamental
> problem with FLTK...
>
>
>    Luis
>
>
> ------------------------------
>
> Phillip Cheng wrote:
>> Hi Luis,
>> I wiped my InsightApplications directory, did a fresh checkout from 
>> CVS, and tried a build.  I got the same result.  The majority of the 
>> fltk applications build, but those seven give the same linker error.  
>> Here's the list again:
>> AnisotropicDiffusionFltkGui2D
>> AnisotropicDiffusionFltkGui3D
>> GaussianFilter
>> GaussianFilter2D
>> Morphogenesis
>> ImageRegistration2D
>> MetaImageColorViewer
>> And the error:
>> Building executable (...)...
>> ld: Undefined symbols:
>> Fl::error
>> I'm wondering whether any other OS X users can reproduce this.
>> Phillip
>
>