mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2'
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

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

  1. #1
    Join Date
    Dec 2011
    Posts
    8

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

    Hi,

    While creating .exe project in VS2010, I'm getting the following errors:

    libboost_thread-vc100-mt-gd-1_43.lib(thread.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Path.obj

    libboost_thread-vc100-mt-gd-1_43.lib(tss_pe.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Path.obj

    I have included the following preprocessors:
    BOOST__STDC_CONSTANT_MACROS_DEFINED;
    _DEBUG;
    NOMINMAX;
    OSPR_IMPORTS_FAKE;
    UNICODE;WIN32;
    WIN_ENV;
    WIN_PLATFORM;
    XMLUTIL_IMPORTS_FAKE;
    _CRT_SECURE_NO_DEPRECATE;
    _SCL_SECURE_NO_DEPRECATE;
    _SECURE_SCL=0;_UNICODE;
    _WIN32

    Can any one resolve my errors?

    Advance Thanks
    Regards,
    Nagesh

  2. #2
    Join Date
    Dec 2011
    Posts
    8

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

    one more thing,

    Earlier i was also included _HAS_ITERATOR_DEBUGGING=0 , due to this total 6 same errors were coming. So i tried to removing it & now still getting 2 above errors.

  3. #3
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

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

    Are you by chance using Boost MultiArray? I know that in VS2010, there is a bug in MultiArray which causes compiles to fail unless you disable iterator debugging.

    If you do that, however, all compiled boost libraries (such as Thread) must be built with the same _HAS_ITERATOR_DEBUGGING flag set. You can set this on the bjam command line.

  4. #4
    Join Date
    Dec 2011
    Posts
    8

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

    Hi Lindley,

    Thanks for suggesting solution for the earlier errors.
    when i set _HAS_ITERATOR_DEBUGGING flag those errors not coming but now its giving opposite errors as:
    libboost_system-vc100-mt-gd-1_43.lib(error_code.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AdminUtils.obj

    i think this error comes due to setting _HAS_ITERATOR_DEBUGGING flag.

    Now i'm not getting what needs to be done if i set _HAS_ITERATOR_DEBUGGING above error is coming, if i don't set previous two errors are coming.

    Is any way to avoid all errors?

    Regards,
    Nagesh

  5. #5
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

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

    The key, as I mentioned before, is to make sure that the libraries (.lib files) are built using the same setting of _ITERATOR_DEBUG_LEVEL as your executable is.

    You modify the setting for your executable in the project's preprocessor directives.
    You modify the setting for the libraries using the bjam command line.

  6. #6
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

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

    Hi Nagesh,

    You might want to try change _DEBUG to NODEBUG in your preprocessor settings.

    Regards,
    Kevin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center