_ITERATOR_DEBUG_LEVEL error in visual studio

后端 未结 3 835
野趣味
野趣味 2020-12-18 18:27

I am trying to compile JRTPLIB in Visual Studio 2010 on windows 7. It\'s been a true nightmare... but I\'m atleast narrowing down the problems.

This is left.

3条回答
  •  心在旅途
    2020-12-18 19:21

    Compile everything you use with -D_ITERATOR_DEBUG_LEVEL=0 option. It is so by default in VS 2010 Release mode, but some things are still built with other options and so are not binary compatible.

    In older visual studios there was _SECURE_SCL and i am not sure if some of code may still use it. Put somewhere (say into stdafx.h) a static check that these match.

    #if _ITERATOR_DEBUG_LEVEL == 0 && _SECURE_SCL != 0 
    #error _SECURE_SCL != 0 when _ITERATOR_DEBUG_LEVEL == 0 
    #endif 
    

    If you want to see what value _ITERATOR_DEBUG_LEVEL has then you can use some #pragma message in code to tell you.

提交回复
热议问题