[SOLVED] Xcode compilation problems roundup and solutions

Hello everyone

after 2 days of hitting my head hard against Xcode compilation problems here I’ve summed up all the forum post references and solutions that finally made it work

here is the documentation for whoever incurs in the same nasty problems of compilation with Xcode

HOW TO SOLVE XCODE COMPILATION PROBLEMS - a roundup of solutions
(what worked for me)

configuration tested:
Mac OsX 10.6.4 Snow Leopard
xcode 3.2.3
OpenFrameworks 0.062 FAT

IMPORTANT: The following settings MUST BE SET FOR BOTH the current project you are trying to compile
AND the openFrameworksLib.xcodeproj

steps for newbies:
1- open the project you want to compile (ie:/of_preRelease_v0062_osxSL_FAT/apps/windowExample/windowExample.xcodeproj)
2- upper menu “poject” > edit project settings
3- in the window that just opened > build tab
4- look for the following settings and set them as marked here:

  
--------------- SETTINGS (images further down) ---------------------  
Architectures  
Architecture: 32- bit Universal  
Base SDK	: Current Mac Os X  
build Active Architecture Only: unchecked  
  
Compiler Version: Gcc 4.0  
  
Search Paths  
Library Search Paths: all recursive except  poco/include and addons  
(double click the value to open the editing window)  
-----------------------------------------------------------------------  

  • REPEAT THE SAME STEPS FOR the openFrameworksLib.xcodeproj
    (doubleclicking on the groups&files_sidebar > openFrameworks_folder > openFrameworksLib.xcodeproj of the current project caused me to crash Xcode)
    best option is:
    5- open /of_preRelease_v0062_osxSL_FAT/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj
    6- repeat steps 2->4

7 just to be sure clean all the targets and dependencies by
upper menu “build” > clean all targets (with all options checked)

8- build and run your application → voilà it should work (it did for me :slight_smile: )


by double clicking the search paths you open these settings window


reference of other forum posts relating to similar Xcode compilation problems:
Their solutions are all summed up in mine and are what I used to find my solution.
If my solution doesn’t work for you, check these:

Snow Leopard and X
http://forum.openframeworks.cc/t/0.061-changes-to-xcode-project-structure/3076/0

change Gcc compiler version to 4.0
http://forum.openframeworks.cc/t/snow-leopard—sticky-thread/2749/0

change architecture and build settings
http://forum.openframeworks.cc/t/xcode-3.2.4—of-git-hub—can’t-compile/4624/0
http://forum.openframeworks.cc/t/snow-leopard-±new-xcode-=-of-nightmares/2599/0

problem with poco or Carbon.h precompilation - uncheck recursiveness of search paths
http://forum.openframeworks.cc/t/carbon.h-precompile-error/2189/11">http://forum.openframeworks.cc/t/carbon.h-precompile-error/2189/11]http://forum.openframeworks.cc/t/carbon.h-precompile-error/2189/11

thanks to you all for providing this awesome tool
hope it helps
cheers
beltran

1 Like

Hello,

I have tried all these steps and I cannot get the latest GitHub OF to compile with.

Xcode 3.2.5
OF Latest
10.6.5

I’ve heard a lot of people have had issues with XCode 3.2.5

from your output it looks as though it’s not correctly addressing the libraries…
are you sure that you’ve set the same options also for the openframeworks library?
not the one that you can find in your own project folder, but the one that you can find in
/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj .(even if the one in your project is actually linking to this one,
I found that when accessing it from my project structure it either crashed xcode or didn’t save the settings.)

if this doesn’t work
try uninstalling and reinstalling XCode (maybe also an older version, unless you have to do funky ipad programming)
and be sure to set the option to include the 10.4 dev tools when installing
as suggested on this thread and in the OF setup instructions
http://forum.openframeworks.cc/t/xcode-3.2—compilation-problem/4540/0

remember to restart your computer even if the xcode installation doesn’t require it…it helped me…

hope it helps
good luck
I myself had to fight with this for quite a while
cheers
b.

Thanks for posting this guide - followed it to the letter and it solved all the compile issues I was having with xcode 3.25. happy days!

Wow, this worked! I thought I was losing my mind. The only thing that sort of puzzles me is I seem to have lost my ability to set the base SDK at upper left to 10.xx. All it shows is i386 and ppc. Anyone know why that is? My apps still compile, SDKs are set in project settings (both) but the upper left selector looks like this:[attachment=0:ber836gw]sdk_not_available.png[/attachment:ber836gw]

unfortunately following all instructions here has not fixed this frustrating problem for me. some progress was made, about 500 errors have now been reduced to 15. screenshot attached. i’m using empty example from oF 0062 with xCode 3.2.5 on 10.6.6.

[attachment=0:1jyr59di]oF62errors.JPEG[/attachment:1jyr59di]

couldn’t find anything related to QuickTimeGrabber / Player errors in forum.

Glew problems maybe related to fact that core libraries in left column shows GLee but there is no libs/GLee in 0062?

Shell script Cp “no such file or directory” errors i have no idea :frowning:

important note: 0061 works fine, even if all the recommendations above are ignored - i.e. GCC Compiler set to 4.2, header search paths not set to recursive (except for libs/openFrameworks), and Architectures set to .

any help is appreciated.

from the errors you’re getting it seems you’re using the version from github. that version is currently unstable and it could not work, so better download 0062 from the downloads section

@arturo, thanks for the response - i am using 0062 from downloads page, folder named of_preRelease_v0062_osxL_FAT.

@lyricalpolymath - thanks for assembling this thread to begin with. one small correction, if i’m not mistaken, you wrote “Library Search Paths: all recursive except…” but you meant “Header Search Paths” judging from your screenshots.

i tried installing 0062 on another machine to test, also with 10.6.6 and xcode 3.2.5, and the results were even worse (111,369 errors). i’ll try another complete reinstall of xcode.

it seems, given all the problems people are experiencing, this page - http://www.openframeworks.cc/setup/xcode - should be updated with clear instructions? i’d be happy to contribute, if i ever figure out how to get it to work :-p.

also @lyricalpolymath - for search paths you wrote “all recursive except poco/include and addons”, but in your screenshot you say “addons too should be checked” - which is it? in your screenshot addons has a strange symbol in the checkbox. i tried both ways and no dice, but i thought it would be good to clarify for others.

[attachment=0:3lyq6dn1]Screen shot 2011-03-05 at 11.09.57 AM.JPEG[/attachment:3lyq6dn1]

[attachment=1:3lyq6dn1]Screen shot 2011-03-05 at 11.07.50 AM.JPEG[/attachment:3lyq6dn1]

![](http://forum.openframeworks.cc/uploads/default/1000/Screen shot 2011-03-05 at 11.07.50 AM.JPEG)

![](http://forum.openframeworks.cc/uploads/default/1001/Screen shot 2011-03-05 at 11.09.57 AM.JPEG)

SUCCESS!

A complete reinstall of xCode 3.2.5 and a system restart fixed the problem. I had already installed 10.4 support, so I don’t know what was different about the reinstall, but it worked.

I would suggest everyone with issues do this first - because it works even without all the settings changes discussed above. i.e. gcc 4.2, no changes to paths, etc - it works fine.

also i reinstalled on a second machine without uninstalling first, and it worked.

additional warning - the xCode Templates included in 0062 are set to 10.4 SDK no matter what you’re using so will not work. you must update SDK using Project / Edit Project Settings / Build Tab, then set Base SDK. note: you can edit the template file itself. you can’t save it, but when you close it, it will save, xCode doesn’t tell you this.

It helped, thanks!

It did the trick for me too !! THANK’S