Compiling OpenGL SOIL on Mac OS X

weicool picture weicool · Dec 11, 2009 · Viewed 7.4k times · Source

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

Answer

revenantphoenix picture revenantphoenix · Feb 2, 2010

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