First time compiling in Xcode 3.2 in Snow Leopard

Hi everyone,

I’m new at developing in OpenGL on the Mac (I’ve worked with OpenGL on Linux years ago). I just downloaded the SuperBible projects and can’t seem to get anything to compile. I keep getting the error:

“There is no SDK with the name or path ‘Developer/SDKs/MacOSX10.4u.sdk’”

I’m working on Xcode 3.2 on Snow Leopard (MacOSX 10.6.1). I’ve checked the Developer/SDKs directory and (of course) only found MacOSX10.5.sdk and MacOSX10.6.sdk.

I don’t know where this error is coming from in my project and would greatly appreciate help getting started.

Thanks.

I answered my own question about five minutes after making this post! It’s actually very simple, so for anyone who is curious:

You need to ensure that you have the correct active SDK and architecture set in Xcode. These are indicated on the top left hand drop-down menu above the “Groups & Files” list. Depending on what system you have, you need to make the corresponding selection for “Active SDK” and “Architecture.” For my system, the appropriate selection is “Mac OS X 10.6” and “i386.”

Hi,

I just upgraded to Snow Leopard and I am trying to compile the OpenGL Superbible examples. I did as you suggested and changed the Active SDK to 10.5 or 10.6, also I changed the Active Architecture to i386 and x86_64, but I get this compile error:

/Users/rolf/Projects/SB-MacwBin/examples/projects/apple/chapt05/sphereworld/…/…/…/…/src/shared/gltools.cpp:148:0 /Users/rolf/Projects/SB-MacwBin/examples/projects/apple/chapt05/sphereworld/…/…/…/…/src/shared/gltools.cpp:148: error: ‘FSMakeFSSpec’ was not declared in this scope

Also some Warnings:
/Users/rolf/Projects/SB-MacwBin/examples/projects/apple/chapt05/sphereworld/…/…/…/…/src/shared/gltools.cpp:148:0 /Users/rolf/Projects/SB-MacwBin/examples/projects/apple/chapt05/sphereworld/…/…/…/…/src/shared/gltools.cpp:148: warning: ‘FSMakeFSSpec’ is deprecated (declared at /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:10072)

If you got yours working, did you also get these errors and warnings? Did you change the gltools.cpp file to get it working?

Rolf

I found a work around to get the examples running with Snow Leopard.

  1. Install XCode with 10.4 support. This is found on Snow Leopard install disc under Optional Installs. Install XCode but make sure you tick 10.4 Support, it is disabled by default.
  2. Open your OpenGL Project
  3. Edit the Project Settings, under Project Menu. Under ‘C/C++ Compiler Version’ change to GCC 4.0 (GCC 4.2 is not compatible with 10.4)
  4. On Drop down on main edit screen above Groups & Files (Not in Project Settings), change ‘Active Architecture’ to i386.
  5. Compile and Run

You may get a couple of warnings but it will run.