Hi, I am using Xcode 4 and trying to set up FLTK 1.3.0 to run Bjarne Stroustrup's Chapter 12 FLTK Demo at the end of the chapter. I keep getting the following error when compiling, and have no idea where to go. I have an idea it might have to do with the linker flags, but I don't know what flag to add and where...
Here's the error:
Undefined symbols for architecture x86_64: "Fl_JPEG_Image::Fl_JPEG_Image(char const*)", referenced from: Graph_lib::Image::Image(Point, String, Graph_lib::Suffix::Encoding) in Graph.o "Fl_GIF_Image::Fl_GIF_Image(char const*)", referenced from: Graph_lib::Image::Image(Point, String, Graph_lib::Suffix::Encoding) in Graph.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Asked
Active
Viewed 1,143 times
2

bubbagump00
- 21
- 2
2 Answers
3
Are you passing the linker flags present with --use-images
? try:
> fltk-config --use-images --ldflags
and check the results to make sure you're getting either the system image libs, or the ones optionally built with fltk.

Brett Hale
- 21,653
- 2
- 61
- 90
2
I also found this to be quite useful:
fltk-config --compile test.cpp
It worked perfectly for me. For more examples of using fltk-config check out http://www.fltk.org/doc-1.1/basics.html

SteVwonder
- 175
- 1
- 1
- 8