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/

相关文章:

c++ - 提高远离相机的深度缓冲精度

c++ - VS 告诉我 ctype.h 中存在构建错误

c++ - 使用opencv mat处理AVFrame导致编码错误

c++ - C++ 标准中的 if..else 语句

visual-studio - 相当于 dotnet core/csproj 中的 AssemblyInfo

objective-c - 如何在Objective-C OpenGL中正确使用InitWindow?

c++ - 迭代结构中定义的 vector

c++ - 如何将 boost 绑定(bind)与成员函数一起使用

c++ - 如何使用visual studio在c中捕获全屏

c++ - 在没有安装 Visual Studio 的情况下编译 Visual Studio 项目?