c++ - Visual Studio 2015 不会链接 GLFW

标签 c++ visual-studio opengl glfw

我一直在关注 learnopengl.com 上的教程,但是当我尝试使用 GLFW 编译程序时出现此错误:

1>LINK : fatal error LNK1104: cannot open file 'glfw3.lib'

这是我目前的代码:

#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>

int main() {
std::cout << "HelloWorld" << std::endl;
return 0;
}

我知道我有正确的“包含目录”和“附加依赖项”,因为 a) 我仔细检查过 b) glew 没有任何问题

最佳答案

您还需要将“库目录”指向 glfw3.lib 所在的位置。

关于c++ - Visual Studio 2015 不会链接 GLFW,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34352283/

相关文章:

python - 让 VisPy 的 MPL_plot 发挥作用

java - JVM 使用 JOGL、顶点缓冲区对象并尝试在 finalize 方法中释放 vbo 时崩溃

C++ std::function 运算符=

c++ - 如何保留条件操作的结果?

visual-studio - Visual Studio 2013 隐藏通知按钮

具有更友好错误消息的 C++ IDE

opengl - 冻伤 PBR : different compression on separate texture channels of the same texture

c++ - 这个表达有什么问题? "if (factorarray[x]%2 == 0 && factorarray[x]%3 ==0..."

由于语言设计而导致的 C++ 特定模式

asp.net - 使用 Visual Studio 发布 Web 应用程序项目