PDA

View Full Version : Newbie Can't Compile



12-14-2001, 05:30 AM
Hi, I am trying my hand at OpenGL on OS X
10.1 and cannot get a compile to work. I've
had limited experience on Linux with OpenGL but have decided to focus my efforts on OS X.

Here is my compile line:
cc -framework OpenGL -framework GLUT -lobjc test.c

and here is the result which I cannot figure
out how to eliminate:

/usr/bin/ld: Undefined symbols:
_glutInitMac

I have looked at the SDK download from
Apple and in the framework folders but
am unable to figure anything out from
that.

Any help would be appreciated very much!
Mak

12-21-2001, 09:38 PM
I had no problem compiling the hello.c program from the "lego" OpenGL book with your compile line. I did this under both OS 10.1.1 and 10.1.2.

Perhaps if you posted your program, more insight as to the problem might be gained.

Vik

OneSadCookie
12-23-2001, 04:04 PM
Looks like you are using the headers from the OpenGL 1.2.1 SDK. Those headers are for MacOS <= 9, not MacOSX. All the headers and libraries you need are included with MacOSX and/or the developer tools.

You may need to change your includes to <GLUT/glut.h> and <OpenGL/gl.h> to fix the problem.

01-01-2002, 04:26 PM
OneSadCookie: Thank you very much for
your response. That was exactly it, wrong included header directory. Thanks again for all the responses from everyone!

mak



Originally posted by OneSadCookie:
Looks like you are using the headers from the OpenGL 1.2.1 SDK. Those headers are for MacOS <= 9, not MacOSX. All the headers and libraries you need are included with MacOSX and/or the developer tools.

You may need to change your includes to <GLUT/glut.h> and <OpenGL/gl.h> to fix the problem.