Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

_iterator_debug_level value '0' doesn't match value '2'

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.

like image 545
meds Avatar asked Nov 02 '10 18:11

meds


2 Answers

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).

like image 78
Michael Goldshteyn Avatar answered Sep 19 '22 17:09

Michael Goldshteyn


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.

like image 23
Andreas Spindler Avatar answered Sep 19 '22 17:09

Andreas Spindler