'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in xxx.obj

'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in xxx.obj

Anonymous
Not applicable
32,192 Views
1 Reply
Message 1 of 2

'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in xxx.obj

Anonymous
Not applicable

Hello all,

 

I'm setting up my project to use FBX libraries.    Everything links wonderfully for my Release configuration (/MD Multi-threaded DLL) but I get several hundred of these errors in my Debug configuration (/MDd Multi-threaded Debug DLL):

 

error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in xxx.obj

 

xxx.obj is an object file from my project, not the FBX SDK.  The error does make sense as I can see _ITERATOR_DEBUG_LEVEL explictly set to 0 in Preprocessor Definitions:

 

_DEBUG
ASSERTIONS_ENABLED
WIN32
_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS
_ITERATOR_DEBUG_LEVEL=0
VALIDATE_IS_ASSERT
_WINSOCK_DEPRECATED_NO_WARNINGS
NO_WARN_MBCS_MFC_DEPRECATION
_MBCS

 

So it seems as if _ITERATOR_DEBUG_LEVEL is being explicitly set to 2 in the version of the .lib I am linking against, 2016.1\lib\vs2013\x64\debug\libfbxsdk-md.lib.  Is this expected? Is it possible that the .lib was incorrectly compiled?  _ITERATOR_DEBUG_LEVEL is set to 0 in my project in Release and that links, so that would imply that it is set to different values across the FBX SDK debug/release libs.  I'm not sure if that is correct or not.

 

For further clarification of my project setup, I'm on Win7 using VS2013 and x64 configuration for the project.

0 Likes
Accepted solutions (1)
32,193 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

I found the answer myself.  The default value of _ITERATOR_DEBUG_LEVEL in Visual Studio 2013 is indeed differnet, depending on configuration.  In release _ITERATOR_DEBUG_LEVEL=0 and in release _ITERATOR_DEBUG_LEVEL=2. From MSDN:

https://msdn.microsoft.com/en-us/library/hh697468(v=vs.120).aspx

 

So it was a problem on my side that _ITERATOR_DEBUG_LEVEL=0.  I found that this was being explictly set in one of my many .props files and I removed that line.  Now it defaults to 2 and everyone is happy.

0 Likes