How To Build Your Apps With Fl_Table

The Fl_Table project can either be 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_Table directory is, and to link in the Fl_Table.o and Fl_Table_Row.o files left in that directory after doing a 'make'.

Installing Fl_Table In A Separate Directory

This is the recommended technique; put Fl_Table in a directory where all your projects can refer to it.

It is advised you locate Fl_Table in the same source directory your FLTK version(s) are installed, e.g.

Unix Install Windows Install


    /usr/local/src/fltk-1.x.x/     <-- if fltk is here..
    /usr/local/src/Fl_Table-3.xx/  <-- ..then put Fl_Table here  
      


    c:\fltk-1.x.x\     <-- if fltk is here..
    c:\Fl_Table-3.xx\  <-- ..then put Fl_Table here  
      

In your Makefile, just add the Fl_Table-3.xx directory to your include path, and link in Fl_Table.o and Fl_Table_Row.o on your link line, e.g.

Unix Builds Windows Builds

  TABLEINCS = -I/usr/local/src/Fl_Table-3.xx
  TABLEOBJS = /usr/local/src/Fl_Table-3.xx/Fl_Table.o \
              /usr/local/src/Fl_Table-3.xx/Fl_Table_Row.o \  

  foo: foo.cxx
          g++ $(TABLEINCS) foo.cxx -c
          g++ foo.o $(TABLEOBJS) ..
      

  TABLEINCS = /Ic:\Fl_Table-3.xx
  TABLEOBJS = c:\Fl_Table-3.xx\Fl_Table.obj \
              c:\Fl_Table-3.xx\Fl_Table_Row.obj

  foo: foo.cxx
          cl /TP /C $(TABLEINCS) foo.cxx ..
          link foo.obj $(TABLEOBJS) ..
      

Installing Fl_Table Into Your Project's Directory

You can do this if you want Fl_Table to be part of your app. but the better technique is above; Installing Fl_Table Into A Separate Directory.

Here's an example of how to install Fl_Table into your project's own directory:

        ../src/YourApp/
	        |
	        |-- YourApp.C
		|-- YourApp.H        -- Contains "#include <FL/Fl_Table.H>"
		|-- Makefile         -- Compile with "-I./Fl_Table", 
		|                       link with ./Fl_Table/Fl_Table.o ./Fl_Table/Fl_Table_Row.o
		|
		|-- Fl_Table-3.xx    -- Fl_Table installed as a subdirectory
		:       |
		        |-- FL
			|   |
			|   |-- Fl_Table.H
			|   |-- Fl_Table_Row.H
			|   :
			|
			|-- Fl_Table.o
			|-- Fl_Table_Row.o
			|-- Makefile
			:
This way you can use e.g. "#include <FL/Fl_Table.H>" in your C++ files; just use "-I./Fl_Table-3.xx" as one of the compile flags, and your #include will resolve correctly.

When linking be sure to link with ./Fl_Table-3.xx/Fl_Table.o and ./Fl_Table-3.xx/Fl_Table_Row.o as part of the link instructions for your app. (Or for Windows, refer to the equivalent ".obj" files)