>> [look] at the basic flags FLTK wants you to link with by running:
>>     fltk-config --ldflags
>> ..and if your program is making use of opengl, then look at:
>>     fltk-config --ldflags --use-gl
>> ...
>> http://www.fltk.org/doc-1.1/basics.html#basics
>> the 'Compiling Programs with Standard Compilers' section.


> I am not compiling single program as to compile with
> fltk-config --use-gl --compile test.cpp . I'm compiling three
> programs together creating object files and linking three object
> files together to get an executable.

It's true that you can't use "fltk-config --compile *.cxx" to
compile multi-file projects, but you can still use fltk-config
within the makefile to set flags.

I've just grabbed the following example from an old makefile on
my machine at work:

.o$(EXEEXT):
    @ echo Linking $@ ...
    @ $(CXX) `fltk-config --use-gl --cxxflags` -o $@ $< \
             `fltk-config --use-gl --ldflags`

.c.o:
    @ echo Compiling $< ...
    @ $(CC) $(CFLAGS) -c $<

.cxx.o:
    @ echo Compiling $< ...
    @ $(CXX) -Wall `fltk-config --use-gl --cxxflags` -c $<


I have some more readable examples on my machine at home where
I set CFLAGS, CXXFLAGS, etc. at the top of the makefile using
the `fltk-config` trick.

D.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to