The Fl_Native_File_Chooser project can either be added to FLTK, or installed as a subdirectory either inside your own project, or in a separate directory that all your projects can refer to.Just be sure to compile with the -I (include) flag pointing to where the Fl_Native_File_Chooser directory is, and to link in the Fl_Native_File_Chooser.o file left in that directory after doing a 'make'.
Here's an example of how to install Fl_Native_File_Chooser into your project's own directory:
../src/YourApp/ | |-- YourApp.C |-- YourApp.H -- Contains "#include <FL/Fl_Native_File_Chooser.H>" |-- Makefile -- Compiles with "-I./Fl_Native_File_Chooser", | links with ./Fl_Native_File_Chooser/Fl_Native_File_Chooser.o |-- Fl_Native_File_Chooser -- Fl_Native_File_Chooser installed as a subdirectory : | |-- FL | | | |-- Fl_Native_File_Chooser.H | : | |-- Fl_Native_File_Chooser.o |-- Makefile :
This way you can still just have "#include <FL/Fl_Native_File_Chooser.H>" in your C++ files.. just use "-I./Fl_Native_File_Chooser" as one of the compile flags, and the #include will resolve correctly.During linking, be sure to link in "./Fl_Native_File_Chooser/Fl_Native_File_Chooser.o" as part of the link instructions for your app.
It is advised you locate Fl_Native_File_Chooser in the same source directory your FLTK version(s) are installed, eg:/usr/local/src/fltk-1.1.x-svn/ <-- some rev of fltk /usr/local/src/fltk-2.0-svn/ <-- some other rev of fltk /usr/local/src/Fl_Native_File_Chooser-0.84/ <-- put Fl_Native_File_Chooser hereIn your Makefile, just add the Fl_Native_File_Chooser directory to your include path, and add the Fl_Native_File_Chooser.o to your link line, eg:# FLTK1 INCLUDES = -I/usr/local/src/Fl_Native_File_Chooser-0.84/ LIBS = /usr/local/src/Fl_Native_File_Chooser-0.84/Fl_Native_File_Chooser.o # FLTK2 INCLUDES = -I/usr/local/src/Fl_Native_File_Chooser-0.84/ LIBS = /usr/local/src/Fl_Native_File_Chooser-0.84/NativeFileChooser.o foo: foo.cxx g++ $(INCLUDES) foo.cxx -c g++ foo.o $(LIBS) ..