我尝试按照以下说明进行操作: http://glew.sourceforge.net/install.html 但似乎没有任何作用。首先,它说安装文件如下:
bin/glew32.dll to %SystemRoot%/system32
lib/glew32.lib to {VC Root}/Lib
include/GL/glew.h to {VC Root}/Include/GL
include /GL/wglew.h 到 {VC Root}/Include/GL
但在其下方显示“安装 glew.h、glew32.lib 和 glew32.dll / libGLEW.so 到 OpenGL 等效项 gl.h、opengl32.lib 和 opengl32.dll 所在的位置。”对我来说,它位于另一个文件夹中。
以防万一我将文件放在两个位置。在我的项目属性中,然后转到链接器->输入,将 glew32.lib、glu32.lib 和 opengl32.lib 添加到“附加依赖项”。该项目无法编译。我重复收到错误“LNK2019:无法解析的外部符号”。
我尝试将静态glew32s.lib 文件添加到我的项目中,并包括glew.h 和glew.c 并使用#define GLEW_STATIC,这也不起作用,同样的错误。
我做错了什么?
I've tried following the instructions giving by: http://glew.sourceforge.net/install.html but nothing seems to work. First it says to install the files as follows:
bin/glew32.dll to %SystemRoot%/system32
lib/glew32.lib to {VC Root}/Lib
include/GL/glew.h to {VC Root}/Include/GL
include/GL/wglew.h to {VC Root}/Include/GL
but below that it says to "install glew.h, glew32.lib, and glew32.dll / libGLEW.so to where the OpenGL equivalents gl.h, opengl32.lib, and opengl32.dll are located."which for me is in another folder.
Just in case i put the files in both locations. In my project properties then go to linker->input add glew32.lib, glu32.lib, and opengl32.lib to Additional Dependencies. The project wont compile. I get repeated error "LNK2019: unresolved external symbol".
I've tried adding the static glew32s.lib file to my project and including the glew.h and glew.c and using #define GLEW_STATIC, that doesnt work either, same error.
What am i doing wrong?
发布评论
评论(1)
如果您静态构建它,则不需要将 glew32.lib 添加到您的项目中(这可能是导致错误的原因)。您需要做的就是将 glew.c、glew.h 和 wglew.h 添加到您的项目中;然后在包含 glew 之前,定义 GLEW_STATIC:
If you are building it statically, you don't need to add glew32.lib to your project (which is probably what is causing the errors). All you need to do is add glew.c, glew.h and wglew.h to your project; then before you include glew, define GLEW_STATIC: