最近在开发时碰到这个错误,经过搜索发现出下面的错误,加入下面的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时的分析文章