环境:Qt 4.8.1 + win XP
在实用OpenGL时,glaux库时,出现如何错误:
#include <glaux.h>
#pragma comment(lib, "glaux.lib")
以上包含是必须包含的。。
1>Linking...
1>glaux.lib(tk.obj) : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _GetRegistrySysColors@8
1>glaux.lib(tk.obj) : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _GetRegistrySysColors@8
1>glaux.lib(tk.obj) : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _GetRegistrySysColors@8
解决方法:
#pragma comment(lib, "advapi32.lib")
本文介绍在使用OpenGL和glaux库时遇到的链接错误,并提供了解决方案,即通过链接advapi32.lib来解决未解析的外部符号问题。
4231

被折叠的 条评论
为什么被折叠?



