我一直在关注 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/