PDA

View Full Version : Newbie question about OpenGL in project builder



02-20-2002, 05:58 PM
Hi, I've just started today to learn OpenGL on my Mac running 10.1.3 I'm doing OpenGL work in Visual C++ in Windows for my Computer Graphics Theory class, so I thought it'd be cool to port projects I'm working on to OS X.

I'm starting out trying to compile the empty window code from the NeHe Mac OS X tutorial. I followed all the instuctions on the site, but I get an "undefined symbol DrawGLScene, INitGL , ReSizeGLScene" error. Anyone know how I can fix that?

Gavin
02-21-2002, 05:12 AM
in carbon?

02-21-2002, 03:58 PM
Yeah, it's in carbon.

Gavin
02-22-2002, 12:52 AM
What libs etc have you added to the project?

02-22-2002, 03:17 PM
I added the OpenGL and GLUT frameworks to the project and called both header files at the start of the program. I edited the program a bit between the first post and now (just am going for a window screen to appear) but I am getting numerous runtime errors causing the app to quit when I try to run it.

02-26-2002, 11:35 AM
I just looked through the same projects, and found no errors with the fist "lesson".
But in the 2nd lesson, someone had forgot to include the OpenGL.Framework.
Just include it; and it works.

02-27-2002, 06:32 AM
I was playing with the code, and it seems the problem was that the Init, Display, etc
functions that were suppose to be empty were written like this:

Init();

I decided to change it to this:

Init()
{}

And the program compiled and ran fine. I've never had a problem in VC++ using a semi to create an empty function before, so I was surprised that seemed what was giving project builder fits. Thanks for your help.

03-11-2002, 06:25 AM
Hello Jedi !

Welcome to the ANSI C programming...
My experience on Cocoa is poor but I realy love it. It's so much powerfull. Really, try to forget carbon and go directly to cocoa. It is very well documented and programming becomes so nice...

When programming with cocoa you could go step by step including C, and Java code in your programm fully transparent.

Bye. :-)
SLJC