Visual studio 2010 VisualStudio 6到VS2010的迁移:奇怪的链接器错误

Visual studio 2010 VisualStudio 6到VS2010的迁移:奇怪的链接器错误,visual-studio-2010,linker-errors,visual-studio-6,Visual Studio 2010,Linker Errors,Visual Studio 6,我有一个DLL项目,它可以编译、链接VisualStudio6并与之配合使用 现在我已经将其加载到VisualStudio2010中。在导入旧的.dsp文件期间,VS2010要求我将其转换为.vcxproj文件。之后,我尝试编译新转换的项目,但在调试构建中偶然发现了这个奇怪的链接器错误: error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: struct oa

我有一个DLL项目,它可以编译、链接VisualStudio6并与之配合使用

现在我已经将其加载到VisualStudio2010中。在导入旧的.dsp文件期间,VS2010要求我将其转换为.vcxproj文件。之后,我尝试编译新转换的项目,但在调试构建中偶然发现了这个奇怪的链接器错误:

error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: struct oapc_bin_head * const & __thiscall std::_Deque_const_iterator<struct oapc_bin_head *,class std::allocator<struct oapc_bin_head *> >::operator*(void)const " (??D?$_Deque_const_iterator@PAUoapc_bin_head@@V?$allocator@PAUoapc_bin_head@@@std@@@std@@QBEABQAUoapc_bin_head@@XZ)
错误LNK2019:函数“public:struct oapc\u bin\u head*const和thiscall std::\u Deque\u const\u iterator::operator*(void)const”中引用了未解析的外部符号\uuu imp\uuuuu CrtDbgReportW(??D?$\u Deque\u const_iterator@PAUoapc_bin_head@@V$allocator@PAUoapc_bin_head@@@std@@@std@@@QBEABQAUoapc_bin_head@@XZ)
_DEBUG compile开关在调试模式下定义,而NDEBUG开关在发布模式下定义。令人惊讶的是,在释放模式下,错误完全不同:

error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xlength_error(char const *)" (__imp_?_Xlength_error@std@@YAXPBD@Z) referenced in function "protected: void __thiscall std::deque<struct oapc_bin_head *,class std::allocator<struct oapc_bin_head *> >::_Xlen(void)const " (?_Xlen@?$deque@PAUoapc_bin_head@@V?$allocator@PAUoapc_bin_head@@@std@@@std@@IBEXXZ)
错误LNK2019:未解析的外部符号“\uu declspec(dllimport)void\uu cdecl std::\u Xlength\u error(char const*)”(\uu imp?\uxlength_error@std@@YAXPBD@Z)在函数“protected:void\u thiscall std::deque::\u Xlen(void)const”(?\u Xlen@)中引用$deque@PAUoapc_bin_head@@V$allocator@PAUoapc_bin_head@@@std@@@std@@IBEXXZ)
你知道在项目文件转换过程中丢失了什么吗


谢谢

看来您在链接到std dll时遇到了一些问题。 它可以类似于在x64中构建其中一个,在x86中构建另一个,只是不将dll添加到链接或类似的内容


您可以发布visual studio使用的链接器命令吗?

这个答案有用吗?这个链接没有,对不起,没有帮助_调试在调试生成中是必需的,(不仅如此)assert()如果不存在将无法正常工作。至少解决了调试生成问题:必须针对msvcrd.lib而不是msvcrt.lib/OUT进行链接:“../plugins/rtc.dll”/INCREMENTAL/NOLOGO/LIBPATH:…/dll”。/liboapc/DEBUG/liboapc.lib”“msvcrt.lib”“Ws2_32.lib”“kernel32.lib”“user32.lib”“gdi32.lib”“winspool.lib”“comdlg32.lib”“advapi32.lib”“shell32.lib”“ole32.lib”“oleaut32.lib”“uuid.lib”“odbc32.lib”“odbccp32.lib”/MANIFEST/ManifestFile:。\Debug\rtc.dll.intermediate.MANIFEST”/ALLOWISOLATION/MANIFESTUAC:”level='asInvoker'uiAccess='false'/Debug/PDB:“F:\demos\Debug\rtc.PDB”/SUBSYSTEM:CONSOLE/PGD:”F:\demos\Debug\rtc.pgd”/TLBID:1/DYNAMICBASE/NXCOMPAT/IMPLIB:“.\Debug\rtc.lib”/MACHINE:X86/ERRORREPORT:QUEUE