gpt4 book ai didi

c++ - 在 Xcode 中使用 GLFW

转载 作者:太空宇宙 更新时间:2023-11-04 13:06:55 26 4
gpt4 key购买 nike

我无法让 GLFW 在我的 Xcode 8 上工作并获得 demo来自在 Xcode 中工作的网站。我通过 Xcode 中的命令行类型项目使用 C++,并导入了 Cocoa 和 OpenGL 框架。使用 MacPorts 并使用 sudo port install glfw,我得到了 libglfw.3.2.dylib 并将该框架导入到我的项目中。但是还是无法识别

#include <GLFW/glfw3.h>

由于某些原因,Xcode 无法找到该文件。我究竟做错了什么?我的目标是通过 C++ 从 Xcode 创建一个图形化的独立可执行文件。

最佳答案

您需要在“Build Setting”中将搜索路径设置为头文件所在的位置,例如:“/usr/local/include”

关于c++ - 在 Xcode 中使用 GLFW,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41786692/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com