heading (60K)
Home | Staff and Sections | Course Materials | Resources on the Web




Setting up Mac OS X Environment

  1. GLUT should be already installed in Mac OS X.
  2. Download GLEW source package from the web, compile, and install (it should put things in "/usr/local/" by default.)


Now your computer should be ready to build and run the cs 175 code. To build OpenGL programs, you will have to include the OpenGL, GLUT, and GLEW header files as well as link against the correct library files. The main difference in compiling them is that under Mac OS X, you do not need to tell the compiler where the include files and libraries for GL and GLUT are, but instead simply add options "-framework OpenGL" and "-framework GLUT" during the linking phase.

Compiling and Linking with OpenGL Support

  1. In your main source file, remember to #include <GL/glew.h> and #include <GLUT/glut.h>
  2. When linking, add the options "-framework OpenGL" and "-framework GLUT" to tell the linker that these are used. For example, you can do this by adding the line: "LDFLAGS += -framework OpenGL -framework GLUT" to your Makefile.


If you have any problems please email