The Makefile worked to the point where it generated the hello.o
file, but couldn't link it.
The problem is clearly with this link line, which is missing all
the libfltk.a and X11 link flags:
> g++ -o dist/Debug/GNU-Linux-x86/hello build/Debug/GNU-Linux-x86/hello.o
..and all the errors happen after that, because there's no references
to /usr/lib/libfltk.a in that line at all.
Compare that line to your successful FLTK build line:
g++ -I/usr/include/freetype2 -o hello hello.cxx /usr/lib/libfltk.a -lXft
-lXinerama -lpthread -lm -lXext -lX11
The -I/usr/include/freetype2 bit is probably extraneous,
so a good place to start might be to compile your hello.o as:
g++ -o dist/Debug/GNU-Linux-x86/hello build/Debug/GNU-Linux-x86/hello.o
/usr/lib/libfltk.a -lXft -lXinerama -lpthread -lm -lXext -lX11
..if you get no errors and end up with an executable called:
dist/Debug/GNU-Linux-x86/hello
..then it worked, and you should be able to run it.
As for how to modify your Makefile so that it automatically includes
that build line; assuming the above works, you can /probably/ add a
few lines to the bottom of the Makefile that reads:
hello: hello.o
<TAB>g++ -o dist/Debug/GNU-Linux-x86/hello \
<TAB> build/Debug/GNU-Linux-x86/hello.o \
<TAB> /usr/lib/libfltk.a -lXft -lXinerama -lpthread -lm -lXext -lX11
..where <TAB> is a 'tab' character. Then when you type 'make hello',
it 'should' use the above as link instructions. Depends on how complex
the Makefile is.
Modify to taste, and heed the syntax of Makefiles, which is generally:
target: depend [depend..]
<TAB>command ..
<TAB>command ..
target2: depend2 [depend2..]
<TAB>command ..
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk