質問

I have a large C++ project (20 static libraries, 5 DLLs) and some sort of memory issue that I can't pinpoint. Printing to the CMD window is too unreliable and I go in circles, and I feel like running the project in debug mode is the only hope I have in identifying where this bug is.

However, I can't seem to build my project in debug mode because of the _ITERATOR_DEBUG_LEVEL error in VS.

The accepted solution seems to be to recompile everything at the same debug level. So I tried this and managed to compile all my DLLs (it was a huge can of worms) in the _ITERATOR_DEBUG_LEVEL=0 option.

But I'm still having the _ITERATOR_DEBUG_LEVEL error, I still can't compile my project in debug mode. EDIT The exact error is :

LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2'

It lists these files, where myProject is the project I am trying to compile. projectVRPNabc.o is from another project that was recompiled with _ITERATOR_DEBUG_LEVEL=0

projectVRPNabc.o
myproject123.o
myproject456.o
myproject789.o

Advice, help, please?

役に立ちましたか?

解決 2

There was indeed an issue where the DLL was not compiled with the necessary _ITERATOR_DEBUG_LEVEL in order for the project to compile.

To the naked eye, it would seem that the DLL was compiled under the proper settings in debug mode. This was a lie.

Instead, in the Configuration Manager, the project was set to compile as release mode. So pressing the button to compile when it said "Debug" would actually compile in release instead. The issue gets chalked up as bad user interface design. It also means that the toolbar is unreliable.

TL;DR : Visual Studio's toolbar was a lie.

Visual Studio 2010 Config Manager vs Config Toolbar

他のヒント

_ITERATOR_DEBUG_LEVEL error in visual studio

See the comment here.

According to one of the comments it may be due to an old lib in your dir.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top