[Insight-users] FLTK and ITK on Mac OS X

Luis Ibanez luis.ibanez@kitware.com
Thu, 06 Mar 2003 17:29:53 -0500


Hi Phillip,

The Mac seems to need an additional setup for GUI applications.

You have to run a command like the following:

        /Developer/Tools/Rez Carbon.r -o MyProgram

If this doesn't give you the expected result, you may want to try
this second line that takes advantage of a default configuration
file provided by FLTK for the Mac:


/Developer/Tools/Rez Carbon.r /path-to-fltk/include/FL/mac.r -o
MyProgram


In both cases, please replace "MyProgram" whith the full path
to the executable of the program that you want to configure.

-------

This configuration can be done automatically by CMake if you
add the following lines to your CMakeLists.txt file. (again
replacing "MyProgram" with the real name of your executable).



ADD_EXECUTABLE(MyProgram ${MyProgram_SRCS})

IF(APPLE)
   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
   IF(ITK_APPLE_RESOURCE)
     ADD_CUSTOM_COMMAND(
       SOURCE MyProgram
       COMMAND ${ITK_APPLE_RESOURCE}
       ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/MyProgram
       TARGET VolView
       )
   ENDIF(ITK_APPLE_RESOURCE)
ENDIF(APPLE)

-------

Please let us know if you encounter further problems,


Thanks


Luis


-------------------------------------
Phillip Cheng wrote:
> Hello,
> 
> I'm having some problems using some of the FLTK applications in 
> InsightApplications under MacOS 10.2.4.
> 
> A number of applications such as MetaImageViewer and ImageRegistration 
> build and run without error, but for some reason I cannot bring the 
> windows into focus.  Interestingly, individual window widgets such as 
> buttons and drop lists are responsive, but the window itself is not.  
> Because the windows do not have focus, keyboard events are not 
> received.  For instance, I can load an image in MetaImageViewer and a 
> crosshair appears on mouse-clicks, but I cannot move between slices with 
> the keyboard.
> 
> I am using fltk-1.1.3 and Apple's X11 0.2.  I should also note that I 
> can run fluid and the applications in the fltk/test directory without 
> any window focus problems.
> 
> Another problem is that the InsightApplications build chokes on 
> AnisotropicDiffusionFltkGui:
> 
> ===
> 
> [lots of successful output omitted...]
> 
> Building executable AnisotropicDiffusionFltkGui2D...
> ld: Undefined symbols:
> Fl::error
> make[3]: *** [AnisotropicDiffusionFltkGui2D] Error 1
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_AnisotropicDiffusionFltkGui] Error 2
> make: *** [default_target] Error 2
> 
> ===
> 
> I'm not very familiar with FLTK, so I hope someone out there can help!
> 
> Thanks,
> 
> Phillip
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>