VS 2010 中的 Glew:未解析的外部符号 __imp__glewInit [英] Glew in VS 2010: unresolved external symbol __imp__glewInit

查看:30
本文介绍了VS 2010 中的 Glew:未解析的外部符号 __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.hC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
  • glew32.libC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
  • glew32.dllC:\Windows\System32
  • glew.h in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
  • glew32.lib in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib, and
  • glew32.dll in C:\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.dllglew32d.lib.

  • glew32d.dll 放在 c:\windows\sysWOW64 (我也把它放在 systemsystem32>).
  • 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 in c:\windows\sysWOW64 (I also put it in system and system32).
  • Put glew32d.lib in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
  • Put glew.h in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include

然后就可以了.

这篇关于VS 2010 中的 Glew:未解析的外部符号 __imp__glewInit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆