安装GLEW并将其与Xcode结合使用 [英] Installing GLEW and using it with Xcode

查看:78
本文介绍了安装GLEW并将其与Xcode结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我已经从该站点下载了最新的glew v.1.9,并在终端中进行了安装,我无法确定如何将其成功添加到GLUT OpenGL Xcode项目中.我可以很轻松地添加OpenGl和GLUT框架,但是找不到任何问题框架或类似的框架.

So I already downloaded the lastest glew v. 1.9 from the site and make it in the terminal, what I cant figure out is how to add it successfully to a GLUT OpenGL Xcode project. I can add the OpenGl and GLUT frameworks very easily but I cant find any glew frameworks or something similar.

主要问题是我的文件之一包含#include GL/glew.h,但找不到.

Main problem is that one of my files has #include GL/glew.h and it cant find it.

推荐答案

虽然使用'Frameworks'是Apple的处理方式,但XCode可以让您指定标头路径和共享库(这与Nixlike环境中的约定一样) .

While using 'Frameworks' is the Apple way of doing things, XCode will let you specify header paths and a shared library (as is the convention in Nixlike environments).

1)转到目标的属性, 2)查找标题搜索路径字段,然后向其中添加Glew标题. 3)然后在编译GLEW的目录中查找GLEW共享库(通常是".a"或".so"文件).将此目录添加到目标的库搜索路径,然后 4)然后最后在您的依赖项列表中链接到该库.

1) Go to your target's properties, 2) look for header search paths field and add your Glew headers to that. 3) Then look for the GLEW shared library (typically a '.a' or '.so' file) in the directory where you compiled GLEW. Add this directory to your target's library search paths and 4) then finally link against this library in your dependencies list.

这篇关于安装GLEW并将其与Xcode结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆