PDA

View Full Version : OpenGL (GLUT) C++ and Xcode



brutfood
March 17th, 2008, 11:04 PM
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?

Captain Code
March 18th, 2008, 07:54 AM
Try this one http://blog.onesadcookie.com/2007/12/xcodeglut-tutorial.html

brutfood
March 18th, 2008, 09:27 AM
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?

Viro
March 20th, 2008, 02:05 AM
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.

Captain Code
March 20th, 2008, 12:02 PM
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.

boyfarrell
April 1st, 2008, 05:58 AM
You can also look at the example projects in your Developer folder,
/Developer/OpenGL/GULT/ to find a working project.