# OpenGL (GLUT) C++ and Xcode



## brutfood (Mar 17, 2008)

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 (Mar 18, 2008)

Try this one http://blog.onesadcookie.com/2007/12/xcodeglut-tutorial.html


----------



## brutfood (Mar 18, 2008)

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 (Mar 20, 2008)

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 (Mar 20, 2008)

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 (Apr 1, 2008)

You can also look at the example projects in your Developer folder,
/Developer/OpenGL/GULT/ to find a working project.


----------

