【发布时间】:2012-07-28 11:32:09
【问题描述】:
我正在尝试学习 OpenGL 并使用 openglbook.com 作为我的参考。我正在尝试让 GLEW 和 freeglut 在我的计算机上工作,所以我开始通过他为让它们与 Visual Studio 一起工作而制定的步骤开始:http://openglbook.com/setting-up-opengl-glew-and-freeglut-in-visual-c。我一直在关注它,唯一的区别是我使用的是 Visual Studio 2010 Ultimate。
当我尝试使用 GLEW 时出现此问题;发生这种情况时,我收到链接器错误。以下是错误信息的全文:
1>------ Build started: Project: gl1, Configuration: Debug Win32 ------
1>Build started 2012/07/28 20:12:19.
1>InitializeBuildStatus:
1> Touching "Debug\gl1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>main.obj : error LNK2019: unresolved external symbol __imp__glewGetErrorString@4 referenced in function _Initialize
1>main.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _Initialize
1>c:\users\magpie\documents\visual studio 2010\Projects\gl1\Debug\gl1.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.84
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
有什么帮助吗?当我第一次遇到这个错误时,我尝试从源代码编译 GLEW,但这也没有解决它(假设我做得正确)。
【问题讨论】:
标签: visual-studio-2010 opengl linker glew