Compiling OpenGL SOIL on Mac OS X

前端 未结 4 2183
余生分开走
余生分开走 2021-02-14 07:40

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

4条回答
  •  自闭症患者
    2021-02-14 08:02

    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
    

提交回复
热议问题