Hello fellow FLTK fans.
I work on Mac OS 10.8, and I installed my FLTK with brew and set up an Xcode project by following the steps
here. To be more specific what I did is the following setting on the project:
Header Search Paths : -I/usr/local/include
Library Search Paths : /usr/local/lib
other linker flags: -L/usr/local/lib -lfltk -lpthread -framework Cocoa
After the above setup, I can compile
helloworld.cpp (it draws a fltk box on an fltk window) in attachments without a hitch. But I am unable to compile another source file
glwin.cpp (it draw a yellow square on an OpenGL window) that uses the Fl_Gl_window header. The error message is copied into
error.txt. Some googling of the error leads me
here. So I found out that I could compile correctly with the terminal by the following command
fltk-config --use-gl --compile glwin.cpp
And the option "--use-gl" did all the trick. If without it can only compile helloworld.cpp.
I am curiously wondering, how do I apply an equivalent of this "use-gl" option to the Xcode project so that it compiles right?
Any comments appreciated.
Roger