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

jCrabb13

macrumors newbie
Original poster
Apr 8, 2010
29
0
First time poster on macrumors. It seems like XCode cant find any of my FLTK files...the error is:

FL/Fl.h: No such file or directory

The compiler makes it look like its looking in my file for the program, and therefore cant find the FLTK headers. Does anyone know where they need to be located to be used in XCode projects? i installed based on this website

http://fltk.darwinports.com/
 

chokma

macrumors newbie
Mar 14, 2009
5
0
First time poster on macrumors. It seems like XCode cant find any of my FLTK files...the error is:

FL/Fl.h: No such file or directory

The compiler makes it look like its looking in my file for the program, and therefore cant find the FLTK headers. Does anyone know where they need to be located to be used in XCode projects? i installed based on this website

http://fltk.darwinports.com/

You'll need to add the directory containing FL/Fl.h to your include directories. To do this, choose Get Info from the context menu of your target. Then choose the Build tab. Add the directory containing FL/Fl.h (likely /opt/local/include) to the field "Header Search Paths".

You'll also need to link against the library properly. Under the General tab (next to Build), on the Linked Libraries list, add your libfltk.a, likely from /opt/local/lib.

That should let you build and link against FLTK. But why use FLTK when there's Qt?? :)
 

jCrabb13

macrumors newbie
Original poster
Apr 8, 2010
29
0
I'm bringing this thread back from the dead. I am again trying to do FLTK on my mac (again for school) and I have this warning:

warning: in /opt/local/lib/libfltk.a, file was built for unsupported file format which is not the architecture being linked (x86_64)

and I'm pretty sure that is also the reason for my 7 errors, that all say:

((various fltk function/variable)) referenced from: _main in main.o

somebody help me with this crap please!
 

lloyddean

macrumors 65816
May 10, 2009
1,047
19
Des Moines, WA
For the error message I'm assuming you've MacPorts installed.

Try this from the Terminal:

sudo port upgrade fltk +universal

If it complains it's not installed replace the 'upgrade' with 'install'.

Once that's completed try rebuilding your project and seeing if the correct architecture was produced by MacPorts.
 

jCrabb13

macrumors newbie
Original poster
Apr 8, 2010
29
0
alright well since its been a while i did some more googling and FLTK really upgraded there website! look what i found :)

http://www.fltk.org/articles.php?L979+I20+T+P1+Q

and then i did what the last guy suggested in Terminal:

sudo port upgrade fltk +universal

and now I am getting this linking error when i open up the project template:

Undefined symbols:
"_AudioServicesPlayAlertSound", referenced from:
fl_beep(int) in libfltk.a(fl_ask.o)
fl_alert(char const*, ...)in libfltk.a(fl_ask.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
 

jCrabb13

macrumors newbie
Original poster
Apr 8, 2010
29
0
Is this a Xcode project file or are you compiling things through the CLI?

xcode. i made the project template to where it will automatically integrate FLTK so i can make new projects for my piddly weekly homework assignments.
 

lloyddean

macrumors 65816
May 10, 2009
1,047
19
Des Moines, WA
Does the list on the left side of your project have a folder name Frameworks? If so right click and select "Add" -> "Existing Frameworks". You'll be presented with a file selection dialog. Locate and "add" the "AudioToolbox.framework" to the project and rebuild.
 

jCrabb13

macrumors newbie
Original poster
Apr 8, 2010
29
0
Does the list on the left side of your project have a folder name Frameworks? If so right click and select "Add" -> "Existing Frameworks". You'll be presented with a file selection dialog. Locate and "add" the "AudioToolbox.framework" to the project and rebuild.

ya i found it. thanks for your help!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.