CS 381 Fall 2010  >  Mac GLEW Installation

CS 381 Fall 2010
Mac GLEW Installation

The following instructions for dealing with GLEW under MacOS were written by CS 381 student Kevin Layer, fall 2009. HTML-ified and edited in minor ways by GGC. Additions, comments, etc., are welcome.

Notes

To Install GLEW on a Mac

  1. Go to http://thirdcog.eu/apps/frameworks#glew, and download either the 1.4.0 or 1.5.0 version (a ZIP file).
  2. Extract the zip anywhere on the system (like the desktop for instance).
  3. Open a terminal window and su as root (See http://support.apple.com/kb/HT1528 to learn how to do this).
  4. With root privileges copy the GLEW.framework director from the downloaded directory to the system library.
    # mkdir /System/Library/Frameworks/GLEW.framework
    # cp -R <EXTRACTED_GLEW_DIRECTORY>/Mac/build/Release/GLEW.framework/* /System/Library/Frameworks/GLEW.framework/
    

In the C++ Source File

#include <GLEW/glew.h>

Include this before before including the GLUT header.

To Run in gcc

$ g++ ./<SOURCE_FILE>.cpp -framework OpenGL -framework glut -framework glew -o <EXECUTABLE_FILE>


CS 381 Fall 2010: Mac GLEW Installation / Updated: 26 Oct 2010 / Glenn G. Chappell / ggchappell@alaska.edu