Xcode中opengl的配置
1. GLUT + GLTools + SDL2
- Frameworks
- Search Paths :Framework + Library ( $(PROJECT_DIR)/build )
- Search Paths : Header
2. GLFW + glew + glm + SDL2
- Frameworks
- Search Paths :Framework + Library ( $(PROJECT_DIR)/build )
- Search Paths : Header
3. SOIL库(下载:http://www.lonesock.net/soil.html)
参考:http://www.yarpee.com/?p=204 (Mac SOIL踩坑记)
按照上述配置完后,报错
添加如下库即可
4. 代码中的相对路径,也就是项目运行时的工作文件夹路径配置(Product -> Scheme -> Edit Scheme)
设置Working Directory
参考:https://blog.csdn.net/qq_38130710/article/details/80898543 (OpenGL+Xcode环境配置)
https://www.jianshu.com/p/3fab28d33f0d?nomobile=yes (Mac下使用OpenGL——配置glew/glut/glfw3/gltools环境)
https://blog.csdn.net/xiaokaneier/article/details/38385553 (SDL2在MAC OS X 10.9/10.10 XCode 5下的配置安装)