OpenGL Programming/Installation/Mac< OpenGL Programming
In Mac OS X 10.4 (and most likely all versions of OS X) OpenGL and GLUT are installed with the Xcode/developer tools that came on your Mac OS X installation disc(s).
To use GLUT and OpenGL from within Xcode:
- open Xcode located in "/Developer/Applications/"
- choose "New Project" from the file menu
- choose "Command Line Tool" under the Application template for Mac OS X
- choose type "C++"
- enter your desired project name and directory
- from the "Action" menu (which has a picture of a small gear on it) select "Add -> Existing Frameworks"
- frameworks are stored in "/System/Library/Frameworks/", from there select and add GLUT & OpenGL
When #including OpenGL & GLUT header files (but not the regular ones like iostream) within Xcode, make sure to do so like this:
in other words: