Nehe Tutorial Projects (Newbie Question)


I’d really like to have a go at some of the tutorials on the Nehe Productions site

as they all look really interesting. Unfortunately, it looks like the Cocoa XCode projects very kindly converted by Bryan Blackburn no longer compile on more recent MacOS versions (I’m currently using 10.5.1 on a MacBook Pro).

I wonder if anyone could possibly give me some hints on getting the code to work under OS X 10.4 or 10.5? I get a number of errors with the projects I’ve tried to compile.
The first one is an error for the
#import <Cocoa/Cocoa.h>
line in main.m. Apparently, this library can’t be found. I’m not sure why this should be the case, as the import command for the same library in projects I am able successfully to compile looks identical. Any ideas? I think other errors may be related to the failure to load the Cocoa library.

I’m a complete beginner when it comes to XCode and Cocoa I’m afraid, though I have done bits and pieces of coding and scripting in a number of different languages over the years. I’d love to learn a little about OpenGL on the Mac, and these tutorials seem an ideal starting-point.



Alex Drinkwater
Quartz Composer realtime effects blog:
Music site:

If one project can find Cocoa.h and other cannot, then you should check what your include path is set to in both projects.

If include path settings will not solve this problem, then you should check if the other project (that you can compile) does not include Cocoa library somewhere in it’s folder.

That sounds like a good plan. I’m sure the locations of things have changed since the early days of MacOS X. I have a feeling some of those Nehe tutorials are quiiiiite old now.

I will try to find out how to check the include path.



Any pointers on how I might correct the include path?
I’ve tried right-clicking the libraries in the project view panel, and choosing the appropriate frameworks in /System/Library/Frameworks, but I still get the same error.

Thanks again,


No idea. I use Visual Studio 2003 and it’s in the project properties screen.

Keep in mind that you must have proper path for compiler and for linker. Maybe you were looking in the linker options instead of compiler options?
On Windows, compiler must find all the .h source files and linker must find all the .lib binary files.

Cheers for the advice.

I’ve actually been in touch with the guy who translated the files for the Mac in the 1st place. Apparently, they’re REALLY old, and there may be a number of bugs preventing them working under OS X 10.5, so I think I’ll give up on them for the moment, and take a look at some of the Developer examples, to see what I can learn from those.

Thanks again guys,


The GLUT ports were always much better than the Cocoa ones anyway. They shouldn’t be too difficult to get working in Xcode.

Ah, thanks for that.
I may try the GLUT ones, in that case…



This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.