VS 2010 中的 Glew:未解析的外部符号 __imp__glewInit [英] Glew in VS 2010: unresolved external symbol __imp__glewInit
问题描述
我正在按照红皮书学习 OpenGL.当我来到第 90 页时,我需要使用 glGenBuffers();然后我需要安装glew".按照中的步骤www.cs.uiowa.edu/~cwyman/classes/common/howto/winGLUT.html
I am learning OpenGL by following the redbook. When I come to around page 90, I need use glGenBuffers(); Then I need install "glew". By following the steps in www.cs.uiowa.edu/~cwyman/classes/common/howto/winGLUT.html
我从 glew.sourceforge.net/
下载 glew.zip
并解压文件.
I download glew.zip
from glew.sourceforge.net/
and unpack the files.
我把
glew.h
在C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
glew32.lib
在C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
和glew32.dll
在C:\Windows\System32
glew.h
inC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
glew32.lib
inC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
, andglew32.dll
inC:\Windows\System32
之后,我在 VS 2010 中构建我的项目,并在 Linker->input
中添加依赖项 glew32.lib
.
After that, I build my project in VS 2010 and in Linker->input
, I add dependencies glew32.lib
.
但是当我构建它时,我有错误
But when I build it, I have error
未解析的外部符号__imp__glewInit
我花了一整天寻找解决方案,但没有找到.
I spend whole day to search solutions, but did not find one.
希望有人能帮我解决这个问题.
Hope someone can help me with this.
推荐答案
正如 Hans Passant 之前所说的(他之前回答了我的问题,但删除了答案.)
Just as Hans Passant said earlier (He answered my question earlier but deleted the answer.)
我需要编译glew的源代码.
I need compile the source code of glew.
如何编译,见OpenGL: 如何从源文件编译glew32.dll.
然后你会得到glew32d.dll
和glew32d.lib
.
- 把
glew32d.dll
放在c:\windows\sysWOW64
(我也把它放在system
和system32
>). - 将
glew32d.lib
放入C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
- 将
glew.h
放在C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
- Put
glew32d.dll
inc:\windows\sysWOW64
(I also put it insystem
andsystem32
). - Put
glew32d.lib
inC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
- Put
glew.h
inC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
然后就可以了.
这篇关于VS 2010 中的 Glew:未解析的外部符号 __imp__glewInit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!