在 Xcode 5 中找不到 glm/glm.hpp 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25016262/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:18:11  来源:igfitidea点击:

glm/glm.hpp file not found in Xcode 5

c++xcodeopenglcompiler-constructionglm-math

提问by Fitzy

Other answers seem to have some relevant information, but nothing that fixes the problem I'm having.

其他答案似乎有一些相关信息,但没有解决我遇到的问题。

From my project in Xcode, I chose 'add files to project' and selected the entire glm sub-folder (which I have been told is all you need to use glm). Then, in my main.cppfile, I wrote #include glm.hppto receive the error glm/glm.hppfile not found from the glm.cppfile.

从我在 Xcode 中的项目中,我选择了“将文件添加到项目”并选择了整个 glm 子文件夹(有人告诉我这是使用 glm 所需的全部内容)。然后,在我的main.cpp文件中,我写信#include glm.hpp接收glm/glm.hpp未从glm.cpp文件中找到的错误文件。

Has anyone else had this problem? It is supposedly a header-only library, which means I dont have to add any include paths, right?

有没有其他人有这个问题?它应该是一个仅头文件的库,这意味着我不必添加任何包含路径,对吗?

回答by Icarus3

Update "Header Search Path" in xcode to include your "glm-0.9.5" directory.

更新 xcode 中的“标题搜索路径”以包含您的“glm-0.9.5”目录。

Project->Build Settings->Search Paths->Header Search Paths

( In my case, I have added "/Users/me/work/glm-0.9.5" )

(就我而言,我添加了“/Users/me/work/glm-0.9.5”)