error LNK2019 using VS2008 static lib with VS2005 in the same mode /MDd
I am using the FlashToDirectX.lib which generated with Visual Studio 2008, and my project is in Visual Studio 2005.
My Project Options:
/Od /I "e:\WORK\WORK\Project\MagicCamera\MixCenter\\..\Common" /I
"C:\boost_1_45_0" /I "D:\lib\glog-0.3.1\src\windows" /I "E:\SDK\tinyxml" /I
"E:\WORK\WORK\Project\MagicCamera\Include\flash" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D
"_DEBUG" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\MixCenter.pch" /Fo"Debug\\"
/Fd"Debug\vc80.pdb" /W4 /nologo /c /Zi /TP /errorReport:prompt
The FlashToDirectX Options:
/Od /I "..\Include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm
/EHsc /RTC1 /MDd /Yu"stdafx.h" /F开发者_如何学运维p"..\..\Temp\Flash-to-DrectX_FlashDX_Win32\Debug\FlashDXDebug_Win32.pch" /Fo"..\..\Temp\Flash-to-
DirectX_FlashDX_Win32\Debug\\" /Fd"..\Lib\FlashDXDebug_Win32.pdb" /W3 /WX /nologo /c
/Zi /TP /errorReport:prompt
Error Messages:
1>FlashDXDebug_Win32.lib(FlashDXPlayer.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ),referenced in function "protected: void __thiscall std::vector<struct tagRECT,class std::allocator<struct tagRECT> >::_Tidy(void)" (?_Tidy@?$vector@UtagRECT@@V?$allocator@UtagRECT@@@std@@@std@@IAEXXZ)
1>FlashDXDebug_Win32.lib(FlashDXPlayer.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ),referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<struct tagRECT> >::~_Container_base_aux_alloc_empty<class std::allocator<struct tagRECT> >(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@UtagRECT@@@std@@@std@@IAE@XZ)
1>FlashDXDebug_Win32.lib(FlashDXPlayer.obj) : error LNK2019: unresolved external symbol"__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ),referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<struct tagRECT> >::_Container_base_aux_alloc_empty<class std::allocator<struct tagRECT> >(class std::allocator<struct tagRECT>)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@UtagRECT@@@std@@@std@@IAE@V?$allocator@UtagRECT@@@1@@Z)
I guess the problem is that I am using a different CRT lib, or the compatibility of different .Net versions.
I have tried changing the FlashToDX.lib into dynamic lib and changed /MDd to /Mtd. But I got similar error. I'm a beginner to handle this kind of link error. Any reply would be helpful. Thanks in advance.I Converted the lib solution to VS2005 using the outstanding tool ProjectConverter. Problem solved.
精彩评论