- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我已经阅读了很多关于我的问题的解决方案,但没有任何帮助。我试过干净,重建。重新安装了visual 2010并从专业更改为终极。但我仍然不知道为什么我有这个错误。我的项目如下所示:1 用于测试我的静态库的 Exe 解决方案。1 DLL解决方案静态库。转换为 dll 的代码正在使用 1 个名为 ClassificationFramework 的库中的函数。我将这个库作为头文件和 cpp 提供,所以基本上是源代码。在 Exe 解决方案中,我链接了我生成的库 + 一些其他库来运行它 + ClassificationFramework.dll。当我使用 Release 时一切正常,但是当我更改为 Debug 时(因为我想调试一些东西,我厌倦了在 Release模式下跳过调试器)我得到这个:
2>Link:
2> ClassificationFramework.lib(SampleClass.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
2>ClassificationFramework.lib(SampleClass.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
2>ClassificationFramework.lib(SampleNamesSet.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
2>ClassificationFramework.lib(SampleSet.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
2>ClassificationFramework.lib(DirectoryReader.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
2>C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Debug\Tester.exe : fatal error LNK1319: 4 mismatches detected
当我在 Release 中构建时,我也收到了这些警告:
1>Link:
1> Generating code
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility(101): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because ptimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\directoryreader.cpp(30): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(1589): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\samplenamesset.cpp(226): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\directoryreader.cpp(60): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\samplenamesset.cpp(199): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\sampleset.cpp(27): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1>c:\users\kasia\documents\visual studio 2010\projects\classificationframework\classificationframework\samplenamesset.cpp(59): warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
1> Finished generating code
1>ClassificationFramework.lib(SampleSet.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'ClassificationFramework.lib(SampleSet.obj)' or at 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Release\vc100.pdb'; linking object as if no debug info
1>ClassificationFramework.lib(SampleNamesSet.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'ClassificationFramework.lib(SampleNamesSet.obj)' or at 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Release\vc100.pdb'; linking object as if no debug info
1>ClassificationFramework.lib(SampleClass.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'ClassificationFramework.lib(SampleClass.obj)' or at 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Release\vc100.pdb'; linking object as if no debug info
1>ClassificationFramework.lib(DirectoryReader.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'ClassificationFramework.lib(DirectoryReader.obj)' or at 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Release\vc100.pdb'; linking object as if no debug info
1> Tester.vcxproj -> C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Transformer\Release\Tester.exe
我发现调试器因为 pdb 文件路径错误而跳过。
'Tester.exe': Loaded 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\Work\Release\Tester.exe', Symbols loaded.
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Tester.exe': Unloaded 'C:\WINDOWS\SysWOW64\kernel32.dll'
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\OpenCV2.2\bin\opencv_core220.dll', Binary was not built with debug information.
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcp100.dll', Symbols loaded.
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr100.dll', Symbols loaded.
'Tester.exe': Loaded 'C:\OpenCV2.2\bin\opencv_highgui220.dll', Binary was not built with debug information.
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\user32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\secur32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.4770_x-ww_A689AB02\comctl32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\avifil32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\winmm.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\msacm32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\msvfw32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\avicap32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\version.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\OpenCV2.2\bin\opencv_imgproc220.dll', Binary was not built with debug information.
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\lpk.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\SysWOW64\usp10.dll', Cannot find or open the PDB file
'Tester.exe': Loaded 'C:\WINDOWS\WinSxS\wow64_Microsoft.Windows.Common- Controls_6595b64144ccf1df_6.0.3790.4770_x-ww_8D2E3180\comctl32.dll', Cannot find or open the PDB file
The program '[4984] Tester.exe: Native' has exited with code 0 (0x0).
当我转到 Debug->Windows->Modules 时,我看到他找不到那些 pdb 文件或其他东西。我怎么能说他这些文件在这里和这里?我试图以管理员身份运行 MSvisual,但这也无济于事。我使用 microsoft server 加载 pdb 文件,但也没有帮助。
最佳答案
在 VS2010 中迭代器调试级别在调试时默认为 2,在发布时被禁用。您使用的其中一个 dll 可能在调试中关闭了迭代器调试,因为它是在旧版本的 Visual Studio 中构建的,或者他们明确地将定义添加到项目中。
搜索 _ITERATOR_DEBUG_LEVEL
和 _SECURE_SCL
删除它们或在所有项目和源中适本地设置它们并重建所有内容。
_ITERATOR_DEBUG_LEVEL = 0 // disabled (for release builds)
_ITERATOR_DEBUG_LEVEL = 1 // enabled (if _SECURE_SCL is defined)
_ITERATOR_DEBUG_LEVEL = 2 // enabled (for debug builds)
简而言之,您可能正在混合发布和调试 dll。不要在调试中链接发布 dll,反之亦然!
关于c++ - 错误 LNK2038 : mismatch detected for '_ITERATOR_DEBUG_LEVEL' : value '0' doesn't match value '2' in main. 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7668200/
我正在研究 MSVC 2013 中的 std::vector::insert 实现,我发现了这段代码: #if _ITERATOR_DEBUG_LEVEL == 2 if (_VICO
我已将我自己的静态库链接到我的 QT Creator 项目,该库已使用 VS 2010 Express 针对调试和发布版本进行编译。我的 QT Creator 项目也使用 VS 2010 编译器。 现
我需要调试一个处理大量数据的程序。数据量无法减少 - 我遇到的问题只发生在特定数据集上。 由于处理的数据量,_ITERATOR_DEBUG_LEVEL 开始成为一个问题 - 在调试中,程序慢得多以至于
在 VS2010 中,C++ 项目在 x64/Release 中链接时出现此错误: 错误 LNK2038:检测到“_ITERATOR_DEBUG_LEVEL”不匹配:值“0”与值“1”不匹配 所有其他
我是 CMake 的新手,我想将发布版本的 _ITERATOR_DEBUG_LEVEL 设置为 0,调试版本的设置为 2,以解决在尝试编译依赖于其他项目的项目时出现的问题。 错误: _iterator
我正在尝试在 Windows 7 上的 Visual Studio 2010 中编译 JRTPLIB。这是一场真正的噩梦……但我至少缩小了问题范围。 这是剩下的。 Error 3 error
我的可执行文件调用了一些我自己编写的 DLL。根据这些 DLL 使用的第三方 C++ 库,我无法为所有 DLL 自由选择编译器设置。因此在某些 DLL 中 _ITERATOR_DEBUG_LEVEL设
我有一个大型 C++ 项目(20 个静态库、5 个 DLL)和一些我无法查明的内存问题。打印到 CMD 窗口太不可靠了,我一直在兜圈子,我觉得在 Debug模式下运行项目是我确定这个错误所在的唯一希望
我刚刚将 Visual Studio (C++) 解决方案转移到另一台计算机上,在我所见的范围内设置了所有目录和设置,并对解决方案进行了清理/重建。我在编译的一堆 .obj 上得到了上面的错误,不知道
使用 VS2010 构建时,我正在构建一个导致许多此类链接错误的库: error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': val
我偶然发现了在 Visual Studio 2015 中以 DEBUG 模式编译的问题,其中我收到以下代码的访问冲突错误(在 Release模式下或者如果 _ITERATOR_DEBUG_LEVEL
这里是 Visual C++ 新手。 (我在很久以前就熟悉了 Visual C++ 6,从那时起就偶尔使用过 IDE,但仍然感觉不舒服。给我一个好的旧命令行并离开我的草坪,这就是我的态度。) 我正在帮
我已经阅读了很多关于我的问题的解决方案,但没有任何帮助。我试过干净,重建。重新安装了visual 2010并从专业更改为终极。但我仍然不知道为什么我有这个错误。我的项目如下所示:1 用于测试我的静态库
我是一名优秀的程序员,十分优秀!