openglgraphicstexturessoil

Compiling OpenGL SOIL on Mac OS X


How would I link in or compile SOIL (http://lonesock.net/soil.html) into my C++ OpenGL project on Mac OS X?


Solution

  • On newer versions of Mac OS X, such as Leopard, you'll have to edit the make file and add

    '-arch 1386 -arch x86_64'
    

    to the CXX macro of the Makefile. After compiling, you'll also have to link in the CoreFoundation.framework in your project. So your final build command might look something like

    gcc -Wall -lSOIL -framework OpenGL -framework GLUT -framework CoreFoundation