安装opengl蓝宝书环境配置开发环境后出现"无法解析的外部符号"的错误

error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12 - CSDN博客
error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12
编译OpenGL工程时,在lib库,dll文件都放对位置的情况下,常出现如下的编译错误:
1&------ 已启动生成:
项目: ConsoleApplication4, 配置: Debug Win32 ------
1&源.obj : error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用
1&源.obj : error LNK2019: 无法解析的外部符号 __imp____glutCreateWindowWithExit@8,该符号在函数 _glutCreateWindow_ATEXIT_HACK@4 中被引用
1&D:\Program Files\Visual Studio Ultimate 2013\Projects\ConsoleApplication4\Debug\ConsoleApplication4.exe : fatal error LNK1120: 2 个无法解析的外部命令
========== 生成:
成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
glut.h的注释:
& &Note that the __glut*WithExit routines should NEVER be called directly.
& &To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK.&
解决方案:
在#include &GL/glut.h&前面加上了一句:
#define GLUT_DISABLE_ATEXIT_HACK
本文已收录于以下专栏:
相关文章推荐
本人在VS2010配置好opengl的开发环境后,运行第一个简单程序就遇到了以下错误:
 error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12,...
所在的项目点右键,选择“属性” -& “配置属性” -& “C/C++” -& “预处理器” -& “预处理定义”
移除_DENUG或将 _DENUG改为NDENUG
用VS2013进行opengl 编程时,出现link错误,error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12,该符号在函数
解决方法:
opengl的高级菜鸟问题 看了一本书《OpenGL三维图形系统开发与应用技术》,但是,其中涉及到glut.h文件的函数无法正常连接,典型的错误如下:------ 已启动生成: 项目: gears, ...
今天开始学习openGL,网上找了一个例子,拿来调试,遇到如下问题。
已经加入了各种库和头文件:
#include ...
error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,该符号在函数 OPENSSL_isservice 中被引用参考MSDN:https:/...
通常出现&无法解析的外部符号XXX&都是因为在链接库的时候没有找到相应XXX函数的定义。
出现这个错误是因为glew库没有被正确的配置。
解决方法就是在程序的开头加入下面这一行:
#pragma...
出现错误:
1&WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__DispatchMessageW@4,该符号在函数 _WinMain@16 中被引用
1、配置步骤
(1)首先下载glut相关文件,下载地址:
http://download.csdn.net/detail/u29101
(2)glut.h...
“error LNK2019: 无法解析的外部符号”之分析
最近在用VS 2008开发,初学遇到不少问题,最头疼的问题之一就是:LNK2019。
百度一下讲的并不够全面,反正都没解决我...
他的最新文章
讲师:王禹华
讲师:宋宝华
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)vs2013 使用imagemagick库出现无法解析的外部符号
作者:用户
浏览:465 次
vs2013使用imagemagick库出现无法解析的外部符号错误141errorLNK2019:无法解析的外部符号"__declspec(dllimport)public:virtualthisca
vs2013 使用imagemagick库出现无法解析的外部符号
141 error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual thiscall Magick::Blob::~Blob(void)" (imp_??1Blob@Magick@@UAE@XZ),该符号在函数 "public: thiscall Texture::~Texture(void)" (??1Texture@@QAE@XZ) 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTexturemesh.obj
142 error LNK2001: 无法解析的外部符号 "declspec(dllimport) public: virtual thiscall Magick::Blob::~Blob(void)" (imp_??1Blob@Magick@@UAE@XZ)
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
143 error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual thiscall Magick::Image::~Image(void)" (imp_??1Image@Magick@@UAE@XZ),该符号在函数 "public: thiscall Texture::~Texture(void)" (??1Texture@@QAE@XZ) 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTexturemesh.obj
144 error LNK2001: 无法解析的外部符号 "declspec(dllimport) public: virtual thiscall Magick::Image::~Image(void)" (imp_??1Image@Magick@@UAE@XZ)
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
145 error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: thiscall Magick::Blob::Blob(void)" (imp_??0Blob@Magick@@QAE@XZ),该符号在函数 "public: thiscall Texture::Texture(unsigned int,class std::basic_string,class std::allocator & const &)" (??0Texture@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
146 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: void const * thiscall Magick::Blob::data(void)const " (imp_?data@Blob@Magick@@QBEPBXXZ),该符号在函数 catch$?Load@Texture@@QAE_NXZ$0 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
147 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: thiscall Magick::Image::Image(void)" (imp_??0Image@Magick@@QAE@XZ),该符号在函数 "public: thiscall Texture::Texture(unsigned int,class std::basic_string,class std::allocator & const &)" (??0Texture@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
148 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: void thiscall Magick::Image::read(class std::basic_string,class std::allocator & const &)" (imp_?read@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 "public: bool thiscall Texture::Load(void)" (?Load@Texture@@QAE_NXZ) 中被引用 C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
149 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: void thiscall Magick::Image::write(class Magick::Blob *,class std::basic_string,class std::allocator & const &)" (imp_?write@Image@Magick@@QAEXPAVBlob@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 "public: bool thiscall Texture::Load(void)" (?Load@Texture@@QAE_NXZ) 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
150 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: unsigned int thiscall Magick::Image::columns(void)const " (imp_?columns@Image@Magick@@QBEIXZ),该符号在函数 catch$?Load@Texture@@QAE_NXZ$0 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
151 error LNK2019: 无法解析的外部符号 "declspec(dllimport) public: unsigned int thiscall Magick::Image::rows(void)const " (imp_?rows@Image@Magick@@QBEIXZ),该符号在函数 __catch$?Load@Texture@@QAE_NXZ$0 中被引用
C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseTextureTexture.obj
152 error LNK1120: 9 个无法解析的外部命令 C:UsersTWJCXFDownloadsOpenGL Course1OpenGL CourseOpenGL CourseDebugTexture.exe
具体错误如上
我把.lib文件放入../VC/lib中了
也把.dll文件放入system32了
在你的项目设置里面看下lib的目录是否包含../VC/lib,还有头文件里面是怎么引用的lib
【云栖快讯】红轴机械键盘、无线鼠标等753个大奖,先到先得,云栖社区首届博主招募大赛9月21日-11月20日限时开启,为你再添一个高端技术交流场所&&
稳定可靠、可弹性伸缩的在线数据库服务,全球最受欢迎的开源数据库之一
6款热门基础云产品6个月免费体验;2款产品1年体验;1款产品2年体验
弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率
开发者常用软件,超百款实用软件一站式提供VC6下“error&LNK2019:&无法解析的外部符号&___glutInitWithExit@12”解决方案
起初安装OpenGL的时候,用的是VS2010,也遇到这个问题,看到过这篇文章。但是最后这么做解决不了。而具体的方法我却忘了。
今天要用VC6尝试一段代码,又遇到“无法解析。。。。”,于是网搜,又看到此法,尝试一下居然可以!不过谁想用又臭又长的#define呢?遂转载,记在心里,以期能想起更好的解决方案
<font COLOR="#FF年8月31日23:55:40:
突然又想起来,在vs2010下出问题,可能原因是OpenGL那几个静态链接库版本过时了,而且网上确实有这么个解释,而且当时我可能确实也是这么做的。不过VC6下,我把放在vs2010目录下的头文件库文件都如数复制替换了,仍然要define那么一下。。郁闷
日0:21:31:
很无语,偶然又找到glut3.7.6版本,VC6去掉#define那句竟然也行了。。就是说,确实也是版本问题。。日。
新版下载地址:
以下为转载文章:(原文链接:)
error LNK2019: 无法解析的外部符号
,该符号在函数
1&GEARS.obj : error LNK2019: 无法解析的外部符号
opengl的高级菜鸟问题&
&看了一本书《OpenGL三维图形系统开发与应用技术》,但是,其中涉及到glut.h文件的函数无法正常连接,典型的错误如下:&
------ 已启动生成: 项目: gears, 配置: Debug Win32
1&正在链接...&
1&GEARS.obj : error LNK2019:
无法解析的外部符号 ,该符号在函数
1&GEARS.obj : error LNK2019:
无法解析的外部符号 ,该符号在函数
1&./Debug/gears.exe : fatal error LNK1120: 2
个无法解析的外部命令&
1&生成日志保存在“file://c:/vcprog/OpenGL/book/Chapter03/GEARS/Debug/BuildLog.htm”&
1&gears - 3 个错误,0 个警告&
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过
==========&
反复思考,也没有找到答案,网上也有说类似问题的,但是竟然没有这方面的解决方案,今天看了glut.h的文件内容,glut.h的注释竟然就写着如下内容:&
&& Note that the __glut*WithExit
routines should NEVER be called directly.&
&& To avoid the atexit
workaround, #define
GLUT_DISABLE_ATEXIT_HACK.&&
于是,在#include
&GL/glut.h&前面加上了一句:&
#define GLUT_DISABLE_ATEXIT_HACK&
再次链接,一切正常。&
这个问题几乎困扰了我三个月,今天终于解决了,路就在脚下,痛快!!!!!!!!!!!&
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。error&LNK2019:&无法解析的外部符号
编译结果:
1&test.obj : error LNK2019: 无法解析的外部符号
__imp____glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8
1&test.obj : error LNK2019: 无法解析的外部符号
__imp____glutCreateWindowWithExit@8,该符号在函数
_glutCreateWindow_ATEXIT_HACK@4 中被引用
1&C:\Users\Chjun\Desktop\OpenGLTest\Debug\OpenGLTest.exe
: fatal error LNK1120: 2 个无法解析的外部命令
解决方法:
1.工程属性-&配置(设为‘所有配置’)-&配置属性-&C/C++-&预处理器定义(设为‘GLUT_BUILDING_LIB’)
<img ALT="" src="/blog7style/images/common/sg_trans.gif" real_src ="/images//1147.jpg"
TITLE="error&LNK2019:&无法解析的外部符号" />
2.工程属性-&配置(设为‘活动(Debug)’)-&链接器-&系统-&子系统(设为‘控制台(/SUBSYSTEM:CONSOLE)’)
<img ALT="" src="/blog7style/images/common/sg_trans.gif" real_src ="/images//1820.jpg"
TITLE="error&LNK2019:&无法解析的外部符号" />
已投稿到:

我要回帖

更多关于 opengl环境搭建 的文章

 

随机推荐