OpenGL (GLUT) C++ and Xcode

brutfood

Registered
I want to get into using OpenGL libraries in C++. Can someone get me started?

I found some tutorial at

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Mac_OS_X

I've included the framework, and typed in the example. It compiles ok, but it doesn't run. I get this error-

cocoaglutopenGL has exited due to signal 6 (SIGABRT).
[Session started at 2008-03-18 09:54:15 +0800.]
ZeroLink: unknown symbol '__Z13ReSizeGLSceneii'


Maybe there are some classes I need to add?
 
Still not quite working, as I tried to warp this tutorial to work with C++, rather than C.

I can use OpenGL within C++ programs? - Can't I? How?
 
You need to set your project to not use ZeroLink. Go to Project -> Edit Project Settings and do a search for ZeroLink. Make sure that is unchecked and your program should run.
 
I just copied all the code from the link I posted and created a default Cocoa application. You have to delete the generated main.m code and replace it with the code from the site. I didn't have any problems getting it to work just doing that.
 
You can also look at the example projects in your Developer folder,
/Developer/OpenGL/GULT/ to find a working project.
 
Back
Top