Ramsey's OpenGL Compilation Guide


Standard linux concerns

  1. Use: #include<GL/glut.h>
  2. Use the following flags: -lglut -lGLU
    example: g++ basic.cpp -lglut -lGLU -o basic

Standard cygwin concerns

(These have gotten much worse! Go see my code blog for more on this)
  1. Use: #include<GL/glut.h>
  2. Use the following flags: -lglut32 -lglu32 -lopengl32

Standard mac concerns (valid in 10.4.11)

  1. Change the include lines to look like:
    #include <GLUT/glut.h>
  2. Use the flags: -framework GLUT -framework OpenGL
    example: g++ basic.cpp -framework GLUT -framework OpenGL

Standard windows concerns - using Microsoft Visual Studios .NET

  1. Make sure your windows has glut:
  2. Set up Visual Studios
  3. Use Release for the configuration options for a smaller executable