_iterator_debug_level value '0' doesn't match value '2'
Solution 1
It seems that you are mixing object files built with different settings. Try to do a full clean rebuild and check all project file settings to make sure that the _ITERATOR_DEBUG_LEVEL macro is the same (e.g., you are not mixing debug and release built objects).
Solution 2
In some cases, mixing the options in
Properties>Configuration Properties>C/C++>Code Generation>Runtime Library
Between included Library(ies) and currently working project can cause this problem.
Depending on usage set it as /MD
or /MT
or /MDd
or /MTd
uniformly across all projects.
Solution 3
Mixing binaries (object files) is one reason; another (which I encountered) is the false definition of the _DEBUG
macro in the release build. _DEBUG
is not a standard macro, but used by Microsoft.
After editing the .vcxproj-file in Emacs I mistyped _DEBUG
instead of NDEBUG
for the release, and encountered precisely the same build error.
Solution 4
I have been trying to solve this issue for five days. The Point Cloud Library (PCL) code builds successfully in debug mode but fails in release mode.
I have reconfigured my library several times but it didn't help. I found the problem was that the release version was inheriting _DEBUG so I unchecked it under project properties >> Preprocessor >> Processor Definitions and it was solved.
Solution 5
After trying to solve issue for several days in a debug version of my VS2019 project. Setting the Project >> Properties >> C/C++ >> Processor _HAS_ITERATOR_DEBUGGING=0 definition worked for me.
meds
Updated on July 09, 2022Comments
-
meds almost 2 years
I've just moved over a Visual Studio (C++) solution over to another computer, setup all the directories and settings as far as I can see, and did a clean/rebuild on the solution. I get the error above on a bunch of .obj's on compile, not sure what to do about it.
-
Gyuri about 12 yearsFor some reason one of my projects had _SECURE_SCL=1 defined in release mode and this caused the linker error.
-
korbes over 7 yearsAnother possibility is some project/source file defining _HAS_ITERATOR_DEBUGGING
-
Nima.S-H about 6 yearsI have same problem with pcl, can you explain more about how to solve that? thanks