How to install GLUT on MAC?

Hi,

I was told that in order to run a program on my MAC machine, I need to install OpenGL/GLUT. However, I went to http://www.opengl.org/resources/libraries/glut/glut_downloads.html, and dowloaded the version 3.7 for Unix (since there is no version for MAC). Then I untared the file. What shall I do next to install the package?

Thanks!

Best regards,
Peggy

GLUT is already installed on Mac OS X.

The include file is <GLUT/glut.h> instead of the usual <GL/glut.h>

If you’re building on the command-line, you’ll need to use -framework GLUT -framework OpenGL -framework Cocoa to link your program instead of -L/usr/X11R6/lib -lGL -lGLU -lglut -lX11 that Linux tutorials might tell you.

If you’re going to use Xcode, there’s a tutorial here: http://onesadcookie.com/Tutorials

Thank you!

My problem is: if I ssh to the server from my Linux machine in my lab, everything is fine. But when I ssh to the server from my MAC machine at home, and try to run the same program, the error says:

error while loading shared libraries: libglut.so.3: cannot open shared object file: No such file or directory

Then my friend told me that I need to install OpenGL/Glut on my MAC machine, and change the path in Makefile accordingly.

But why does it have sth to do with the library on my local machine when I run sth on the server? If it really matters, how should I find my OpenGL path and how to set in Makefile?

Thanks!

You’re correct, your local machine can have no influence over the server.

I was assuming you wanted to compile and run your GLUT program on your Mac.

Thanks! But do you have any idea why that error, and how to get it work on my local machine? The program I’d like to run uses OpenGL to do 3D modelling. The display is supposed to appear on the monitor of my local machine. Is this the reason that I must set correct local GLUT path in Makefile?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.