Debian Codegraph @

extensions/Fl_Native_File_Chooser/documentation/how-to-use.html

raw
1 <html><head></head><body><h2>How To Install Fl_Native_File_Chooser Into Your Own Project</h2>
2 <blockquote>
3 The Fl_Native_File_Chooser project can either be added to FLTK, or
4 installed as a subdirectory either inside your own project,
5 or in a separate directory that all your projects can refer to.
6 <p>
7 Just be sure to compile with the -I (include) flag pointing
8 to where the Fl_Native_File_Chooser directory is, and to link in the
9 Fl_Native_File_Chooser.o file left in that directory after doing a 'make'.
10 </p></blockquote>
11 <p>
12 </p><h3>Installing Fl_Native_File_Chooser Into Your Project's Directory</h3>
13 <blockquote>
14 Here's an example of how to install Fl_Native_File_Chooser into your project's
15 own directory:
16 </blockquote>
17 <pre> ../src/YourApp/
18 |
19 |-- YourApp.C
20 |-- YourApp.H -- Contains <b>"#include &lt;FL/Fl_Native_File_Chooser.H&gt;"</b>
21 |-- Makefile -- Compiles with <b>"-I./Fl_Native_File_Chooser", </b>
22 | links with <b>./Fl_Native_File_Chooser/Fl_Native_File_Chooser.o</b>
23 |-- <font color="RED">Fl_Native_File_Chooser</font> -- Fl_Native_File_Chooser installed as a subdirectory<font color="RED">
24 : |
25 |-- FL
26 | |
27 | |-- Fl_Native_File_Chooser.H
28 | :
29 |
30 |-- Fl_Native_File_Chooser.o
31 |-- Makefile
32 :</font>
33 </pre>
34 <blockquote>
35 This way you can still just have <b><tt>"#include &lt;FL/Fl_Native_File_Chooser.H&gt;"</tt></b>
36 in your C++ files.. just use <b><tt>"-I./Fl_Native_File_Chooser"</tt></b> as one of the
37 compile flags, and the #include will resolve correctly.
38 <p>
39 During linking, be sure to link in
40 <b><tt>"./Fl_Native_File_Chooser/Fl_Native_File_Chooser.o"</tt></b>
41 as part of the link instructions for your app.
42 </blockquote>
43
44 </p><h3>Recommendations</h3>
45 <blockquote>
46 It is advised you locate Fl_Native_File_Chooser in the same source directory
47 your FLTK version(s) are installed, eg:
48 <pre>
49 /usr/local/src/fltk-1.1.x-svn/ <I>&lt;-- some rev of fltk</I>
50 /usr/local/src/fltk-2.0-svn/ <I>&lt;-- some other rev of fltk</I>
51 /usr/local/src/Fl_Native_File_Chooser-0.84/ <I>&lt;-- put Fl_Native_File_Chooser here</I>
52 </pre>
53 In your Makefile, just add the Fl_Native_File_Chooser directory to your
54 include path, and add the Fl_Native_File_Chooser.o to your link line, eg:
55 <pre>
56 # FLTK1
57 INCLUDES = -I/usr/local/src/Fl_Native_File_Chooser-0.84/
58 LIBS = /usr/local/src/Fl_Native_File_Chooser-0.84/Fl_Native_File_Chooser.o
59
60 # FLTK2
61 INCLUDES = -I/usr/local/src/Fl_Native_File_Chooser-0.84/
62 LIBS = /usr/local/src/Fl_Native_File_Chooser-0.84/NativeFileChooser.o
63
64 foo: foo.cxx
65 g++ $(INCLUDES) foo.cxx -c
66 g++ foo.o $(LIBS) ..
67 </pre>
68 </blockquote>
69 </body></html>