- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我在 VS 2012 上编译基本 openGL 程序时遇到问题。编译时出现构建错误:
1>LINK : fatal error LNK1104: cannot open file 'glew32.lib'
我按照 GLEW 文档中的说明进行操作。
In your OpenGL project open Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> add glew32.lib.
Also you must include #include in your sources; For that add path to your glew folder: Project -> Properties -> Configuration Properies -> General -> VC++ Directories -> Include Directories and Library Directories;
C/C++ Tab -> General -> Additional Include Directories - Add lib folder there
我还将 glew32.dll 与可执行文件一起添加到我的项目文件夹中的调试文件夹中。到目前为止,我一直收到此错误。
如果您需要进一步说明我所做的步骤,请随时询问
最佳答案
老实说,使用 DLL 版本的 glew 并没有真正的好处(没有减小可执行文件大小,但这在现代 Windows PC 上几乎不重要)。
这不像您可以简单地将新版本的 DLL 放入您的应用程序并使用您以前从未使用过的扩展。同样,对于基本上只解析扩展规范的库,错误修复是如此罕见/不必要。使用 DLL 作为修复随附软件中扩展加载错误的方法的文件也是不切实际的。从长远来看,静态链接到 glew (这意味着 glew32s.lib
)更有意义。
静态链接库在 Windows 上也更易于移植,它可以与 MSVC 和 MinGW 一起使用(而 DLL 库仅适用于 MSVC)。链接到 glew32s
并将其放在您决定用于其他库依赖项的任何目录中。
platform/<Subsystem>
下。 .因此,我有
glew32s.lib
(32 位)和
glew64s.lib
(64 位)在
./Epsilon/platform/OpenGL/glew{32|64}s.lib
关于c++ - Visual Studio 2012 - 错误 LNK1104 : cannot open file 'glew32.lib' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20873321/
使用glew,我正在尝试链接简单的程序 #include int main (int argc, const char * argv[]) { glewInit(); return
我有一个动态库,在构建中包含glew.c,并使用GLEW_STATIC 构建。如果另一个库链接到同一个应用程序并且还以某种方式包含 GLEW,是否有可能由于单一定义规则而导致 Linux 出现问题?
我在 Macintosh 上使用终端。 要编译的命令是基本的: g++ -c String.cpp -o String.o g++ -c FileIO.cpp -o FileIO.o g++ -c
我正在配置一个与 glut 一起工作的程序来与 Qt 一起工作。我正在使用 Qt 5.1.1。并且似乎从 Qt4 到 Qt5 已经丢失了一些 openGL 功能。在我的程序中,我创建了一个 QOpen
我正在尝试做 openGLbook.com 教程。我收到这个常见错误: 1>------ Build started: Project: OpenGL Startup, Configurati
我读过这个 [1],但在我的例子中,CMake 说它找不到 glew。 我在 Windows 上,我的 CMake 模块文件夹中有一个 FindGLEW.cmake 文件,大概是在我安装 CMake-
这很奇怪。我想在我的 gl 程序中实现着色器。 但 GLEW 告诉我,我的系统不支持着色器: //glut init and glew init ... if (GLEW_ARB_vertex_sha
我想使用三角扇绘制不同的图形,但我不知道如何让程序绘制第二个图形。每次我想更改颜色或绘制新图形时,是否需要第二个 vertexShaderSource 和第二个 fragmentShaderSourc
我现在对尝试链接这个 glew 库感到非常沮丧 这是构建日志: g++ -o test.exe "src\\test.o" -lglew32 -lglfw -lglu32 -lopengl32 src
当我尝试在 CLion 中构建我的项目时,我遇到了来自 cmake 的链接错误。我已经尝试过其他线程所说的:将 opengl 放在最后,将 glu 放在第一位,更改我的 include 的顺序并设置
我遇到了这个问题,不知道该怎么办? 'abc.exe': Loaded 'D:\Windows\SysWOW64\nvoglv32.dll', Cannot find or open the PDB
我只是想使用 SDL 2.0 和 glew 1.9 创建一个 openGL 上下文 构建项目时没有问题,但在调试时,GLEW 初始化失败,我该怎么做才能解决这个问题? 我正在使用 visual stu
我正在使用以下代码检查是否有任何错误: glfwInit(); glewExperimental = GL_TRUE; if (glewInit() != 0) { std::cout <<
不知何故,我无法在多个头文件中获取 Glew。它只是提示 Gl 已经在 GLEW 之前定义了。 简而言之,我有以下文件结构: 程序.h 包括: , 和 "SceneManager.h" . 场景管理器
我的机器有 OpenGL 2.0,由于一些奇怪的原因,头文件 gl.h 不包含着色器函数。所以,有人建议我使用 GLEW。我正确安装了 GLEW,并将 glew32s 链接到我的编译器,我还在我的 m
我需要在 Ubuntu 11.10 中加载扩展。我尝试构建 GLEW,但出现以下奇怪错误... ~/Downloads/glew-1.7.0$ make cc -shared -Wl,-soname=
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我试图通过将源文件添加到我的项目来跳过 glew 的“链接步骤”,以使代码更加灵活(目标 32 位和 64 位,只需稍作修改)。我已经使用 Code::Blocks 和 mingw 32 位实现了 3
出于我无法理解的原因,glew 在静态链接时根本不起作用。有没有一种方法可以简单地将 glew.h、glxew.h、wglew.h 和 glew.c 源文件包含到我的项目中并使用 #include "
我编译了 GLEW 库。它似乎工作正常,这里是 make install 的输出: install -d -m 0755 "/usr/include/GL" install -m 0644 inclu
我是一名优秀的程序员,十分优秀!