PDA

View Full Version : Help creating Makefile using FLTK




kellah
Nov 13, 2007, 11:09 AM
Does anyone know how to create a makefile to compile a program with the correct FLTK includes and library files?

I know I've got FLTK installed correctly because I can compile my program by doing this:

fltk-config --compile prog.cpp

When I try to create a makefile to accomplish the same thing I'm screwing up somewhere:

prog: prog.cpp
g++ -I/usr/local/include -I/usr/local/include/FL/images -o prog prog.cpp -L/usr/local/lib /usr/local/lib/libfltk.a -lfltk -lXext -lX11 -lm

When I attempt to make the above makfile it gives me this error:

ld: library not found for -lXext

I'm not quite sure where to go from here. Does anyone have some advice or similar experience?

Thanks!



kellah
Nov 13, 2007, 08:57 PM
Well in case anyone ever needs help with this same problem, I came across this (http://www.geocities.com/rjpoling/MacOS/fltk.html), which was very helpful.