Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

  • 1.  CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Wed November 10, 2010 05:13 PM

    Originally posted by: innovativeScheduling


    I migrated a project from MSVS2005 to MSVS2010. The project is getting build and executing fine in 'release mode' but it is giving following errors(same type of 50 errors) in 'debug' mode:

    Error 96 error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in ODBCWrapper.obj C:\ITDO_DLL\ITDO_Engine\ilocplex.lib(ilocplex.obj) ITDO_Engine

    I tried to work around the problem by following the various suggestions on net(like including _DEBUG in preprocessor, checking for project linker properties, checking for Release folder mismatch etc.) but I am not able to get rid of this error.

    Any suggestion and help on this topic is welcome.

    Thanks in advance :)
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Thu March 24, 2011 02:25 PM

    Originally posted by: SystemAdmin


    I have the exact same problem. Have you found any solution yet? I guess if there would be a debug build of the static libs - concert.lib and ilocplex.lib that would fix it, because I have read that when you mix debug and release builds you get into errors like that with VS2010. Did you try to contact IBM to get debug library versions?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Fri May 27, 2011 03:15 PM

    Originally posted by: RafaelMartinelli


    Me too. I have to debug my project, but I couldn't find any solution besides a debug build of the static libs...

    Anyone?

    Rafael Martinelli
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Fri May 27, 2011 04:54 PM

    Originally posted by: RodrigoLinfati


    Go to: Project, ProjectName Properties...
    Select C/C++, Preprocessors
    Change Configurations to Debug
    Add in Preprocessor Definitions

    code
    _ITERATOR_DEBUG_LEVEL=0
    [/code]
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Fri May 27, 2011 06:04 PM

    Originally posted by: RafaelMartinelli


    I found another workaround.

    Go to: Project -> Properties -> C/C++ -> Code Generation -> Runtime Library
    Change from Multi-threaded Debug (DLL) to Multi-threaded (DLL)

    It worked for me...

    Rafael Martinelli
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Thu March 15, 2012 03:03 AM

    Originally posted by: KKCQ_Ruilong_Li


    thank you very much.
    and how to solve the 4099 warning?
    concert.lib(evaluator.obj) : warning LNK4099:
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Fri May 23, 2014 11:20 AM

    Originally posted by: kingaj12


    Thanks -

    Inserting the compiler directive _ITERATOR_DEBUG_LEVEL=0 worked for me.  Changing Multi-threaded Debug (DLL) to Multi-threaded (DLL) did not work for me.

     

    Alan King


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Fri June 20, 2014 05:29 PM

    Originally posted by: Marc@ATL


    My program is a Windows application using Microsoft Foundation Classes (MFC). Setting _ITERATOR_DEBUG_LEVEL=0 in the preprocessor does allow the program to compile and link.  However the program crashes on startup. Compiling and linking in release mode allows the program to run as intended. The root cause is the mismatch of the concert library (compiled with release) with one or more other libraries used by the program, which are compiled with debug. CPLEX should provide a debug version library of concert. One of the mismatches is created by using the collection classes such CArray in the program.


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Thu June 26, 2014 05:56 PM

    Originally posted by: MaryFenelon


    Debug versions of the libraries for Visual C++ have been provided since 12.4.0.1.


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Tue January 05, 2016 07:05 AM

    Originally posted by: anahana


    Hi,

    I'm running into the same problem, and none of the above solution worked unfortunately. I am trying to build example projects from 12.6.2 on the new VS2015, but I get the same errors mentioned above. It was working just fine with VS2013 and VS2012. Is 12.6.2 not compatible with VS2015?

    Regards, 


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Tue January 05, 2016 07:45 AM

    VS2015 is not yet supported. See also this and this thread.


    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: CPLEX 12.2 MSVS2010 : LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL

    Posted Tue January 05, 2016 08:42 AM

    Originally posted by: anahana


    Thanks Daniel. 


    #CPLEXOptimizers
    #DecisionOptimization