Help creating Makefile using FLTK

Discussion in 'Mac Programming' started by kellah, Nov 13, 2007.

  1. macrumors regular

    Joined:
    Apr 29, 2007
    Location:
    East Lansing, MI
    #1
    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!
     
  2. thread starter macrumors regular

    Joined:
    Apr 29, 2007
    Location:
    East Lansing, MI
    #2
    Well in case anyone ever needs help with this same problem, I came across this, which was very helpful.
     

Share This Page