How to set _ITERATOR_DEBUG_LEVEL in VS2010?
We are using a library by another vendor, which apparently was compiled with the wrong flags, namely _ITERATOR_DEBUG_LEVEL = 0 in 32bit-Debug-mode. While I have already filed a bug report with them, I need an intermediate solution. We do not use stl ourselves, so I am free to change this flag for the subproject that uses said library. But I cannot figure out how to do so. What I tried an didn't work:
/D_ITERATOR_DEBUG_LEVEL=0
> LINK : warning LNK4044: unrecognized option '/D_ITERATOR_DEBUG_LEVEL=0'; ignored
#define _ITERATOR_DEBUG_LEVEL 0
> Nothing happens
What's the proper syntax or opt开发者_运维技巧ion to get the project to compile without checked iterators?
Found the solution.
Project Pages / Configuration Properties / C,C++ / Preprocessor / Preprocessor Definitions.
Add "_ITERATOR_DEBUG_LEVEL=0" in there worked.
Just as additional information : Project Pages / Configuration Properties / C,C++ / Preprocessor / Preprocessor Definitions and set the preprocessor macro _ITERATOR_DEBUG_LEVEL to one of the following depending on the target :
_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)
精彩评论