现在的位置: 首页 > 综合 > 正文

WM5.0unresolved external symbol “void __cdecl `eh vector constructor iterator’处理办法

2013年10月10日 ⁄ 综合 ⁄ 共 514字 ⁄ 字号 评论关闭

最近在开发时碰到这个错误,经过搜索发现出下面的错误,加入下面的lib就可以解决,分享下。

 

这个错误主要是分析创建类对象数组时报错。

 

error LNK2019: unresolved external symbol "void __cdecl `eh vector constructor iterator'

error LNK2001: unresolved external symbol "void __cdecl `eh vector constructor iterator'

error LNK2019: unresolved external symbol "void __cdecl `eh vector destructor iterator'

 

这种错误在stdafx.h中加入下面的lib就可以了

 

#if _WIN32_WCE < 0x500 && _MSC_VER > 1220
// only needed for WM2003 builds under VS2005
#pragma comment(lib, "ccrtrtti.lib")
#endif

 

 

另外推荐一编关于new delete时的分析文章

http://developer.51cto.com/art/200906/131853_1.htm

抱歉!评论已关闭.