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

Luis Ibanez luis.ibanez@kitware.com
Sat, 08 Mar 2003 14:32:42 -0500


Hi Phillip

As a friend of mine used to say:

    "Being paranoid doesn't mean that
     your are not being followed..."       :-)


The FindFLTK.cmake was fixed by defining the
libraries order different for Mac and for
Unix (e.g. Linux). Since the platform dependent
libraries in Unix should be at the end.

Please update (just this file since the repository
is unstable now) and let us know if it works on
your Mac installation.

--

Thanks for the clarification on the Fl::error
signature. You are right, I made a mistake while
copy/pasting the code from the .h file.

About the Rez Carbon.r fix, it seems that it has
to be done in each application. I'm not quite sure
about this. Is Carbon the only option in  the
Mac ?


Thanks


   Luis



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

Phillip Cheng wrote:
 > 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
 >>
 >>