How do I link the glut libs (glut32.lib) into my MAC OS 10.3.7 program

I am trying to compile a simple code but I seem to need to link the glut libs (glut32.lib) in to my program first .

How do I do that?


Tom :confused:

I’m not sure you can do that. I believe .lib files are windows specific. You would need to find an implementation fo glut for Mac OS. Take a look at mesa It’s used for Linux but since Mac OS X is essentially BSD maybe you can somehow compile it. Good luck!

Apples OpenGL Libraries are part of the OpenGL Framework for MacOSX. It should be in either /System/Frameworks or /Library/Frameworks. Also note that the headers for MacOSX are <OpenGL/gl.h> <OpenGL/glu.h> and <OpenGL/glut.h>. There is some switch for specifing frameworks to apple’s version of gcc or you could use Xcode.


Here is a better answer from another thread.

Originally posted by arekkusu:
[b]You need to link against GLUT. Use -framework GLUT -lobjc if you’re compiling from the command line, or add GLUT to the project if you’re using Xcode.

Keith has a tutorial for this.[/b]