Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

psd

macrumors newbie
Original poster
Jun 2, 2009
1
0
I bought a c++ book for beginners and am trying to get my first program to compile. All compiling instructions in the book are for visual studio.

The book uses FLTK which I downloaded and installed and wrote a test program to display a hello world dialog. However when I type

g++ -B /usr/local/include/FL/ test.cpp

I get the following error:
test.cpp:1:16: error: Fl.h: No such file or directory
test.cpp:2:20: error: Fl_Box.h: No such file or directory
test.cpp:3:23: error: Fl_Window.h: No such file or directory

What's wrong?
 
Try

Code:
g++ -I/usr/local/include/FL/ test.cpp

And of course, make sure that /usr/local/include/FL/ exists and contains the headers you need.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.