c – 如何在xcode中链接glew
发布时间:2020-12-14 20:01:57 所属栏目:百科 来源:网络整理
导读:我无法将glew与 xcode联系起来.我有glew库位于/usr/local/lib/libGLEW.dylib 当我在命令行中编译文件时: g++ /usr/local/lib/libGLEW.dylib -framework OpenGL main.cpp 但是当我在xcode中编译时,我得到错误: ‘GL/glew.h’ file not found 码: #include
我无法将glew与
xcode联系起来.我有glew库位于/usr/local/lib/libGLEW.dylib
当我在命令行中编译文件时:
但是当我在xcode中编译时,我得到错误:
码: #include <iostream> #include <GL/glew.h> int main(int argc,const char * argv[]) { // insert code here... std::cout << "Hello,World!n"; return 0; } 我联系了glew和xcode there screenshot OS X 10.8.4,Xcode 4.6.1 解决方法
添加库只处理二进制链接.您需要配置Xcode,以便它还可以找到描述二进制文件内容的标头.
在Xcode项目设置中搜索:标题搜索路径 将路径添加到GLEW的标头(可能与库可能在/usr/local / include附近的文件夹中).更改导入以匹配.它应该是#include< glew.h> (or 对于Xcode初学者,这是一个截图: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |