Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  debug mode won't compile through

    Posted 04/12/08 09:14 AM

    Originally posted by: SystemAdmin


    [cssmile said:]

    it compiled okay when i set it to release but wont' work under debug

    the error msgs are something like this

    LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
    1>LIBCMT.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler already defined in LIBCMTD.lib(invarg.obj)
    1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

    can anyone help me please? thanks a lot
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: debug mode won't compile through

    Posted 04/23/08 06:58 PM

    Originally posted by: SystemAdmin


    [cssmile said:]

    can anyone help me pleeeeeeeeeeeeeeeeeeeeez
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: debug mode won't compile through

    Posted 04/23/08 08:37 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    In the project options, section C++/code generation, you should change the code generation option to use a non-debug runtime library.

    That would change the /MTd flag into /MT (the first option is not compatible with Concert)

    Hope this helps.

    Didier.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: debug mode won't compile through

    Posted 04/23/08 10:01 PM

    Originally posted by: SystemAdmin


    [cssmile said:]

    thank you very much.

    I changed the parameter under "C/C++ --- preprocessor---preprocessor definition" from _debug to NDEBUG, and now it compiles okay.

    But it won't let me debug anymore. Does this mean I cannot debug things under CPLEX11?!! I'm desperately needing help...crying

    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: debug mode won't compile through

    Posted 04/23/08 10:45 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Here is how I could create a debug version from a CPLEX example:

    - copy a release configuration
    Compiler options:
    - In the copy, modify the C++ general settings to generate debug information (/Zi)
    - Remove the compiler optimization (/od) - this can produce strange results otherwise if you step into optimized code.
    - Be sure to use a code generation settings that uses the release compiler runtime libraries (/MT not /MTd for instance)
    Linker
    - enable debug information (/Debug)

    With this, I can step in the CPLEX program.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: debug mode won't compile through

    Posted 04/23/08 11:21 PM

    Originally posted by: SystemAdmin


    [cssmile said:]

    I'm feeling completely dumb now...

    I did what you said but it's still not working

    the command line I have for c/c++ is
    /Od /I "C:\ILOG\Concert25\include" /I "C:\ILOG\CPLEX110\include" /D "WIN32" /D "_CONSOLE" /D "IL_STD" /D "_CRT_SECURE_NO_DEPRECATE" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /errorReport:prompt

    When I clicked "start debugging", the error msg says "fatal error...". Seems that something's wrong with

    void __cdecl _CRT_DEBUGGER_HOOK(int _Reserved)
    {
        /* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */
        (_Reserved);
        _debugger_hook_dummy = 0;
    }

    I have no idea what that is

    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: debug mode won't compile through

    Posted 04/24/08 02:24 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    I'm using Visual Studio 2003 and CPLEX 11. I modified the projects of the ILOG\CPLEX110\examples\x86_.net2003_7.1\stat_mda examples to enable debug, following the procedure that I described yesterday.
    Here is the command line I have for the compiler

    /Od /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "MBCS" /FD /EHsc /MD /GS /Fp".\..\..\..\examples\x86.net2003_7.1\stat_mda/admipex1.pch" /Fo".\..\..\..\examples\x86_.net2003_7.1\stat_mda/" /Fd".\..\..\..\examples\x86_.net2003_7.1\stat_mda/" /W3 /nologo /c /Zi

    And this is the one for the linker
    /OUT:".\..\..\..\examples\x86_.net2003_7.1\stat_mda/admipex1.exe" /INCREMENTAL:NO /NOLOGO /DEBUG /PDB:".\..\..\..\examples\x86_.net2003_7.1\stat_mda/admipex1.pdb" /SUBSYSTEM:CONSOLE ..\..\..\lib\x86_.net2003_7.1\stat_mda\cplex110.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: debug mode won't compile through

    Posted 04/24/08 10:59 PM

    Originally posted by: SystemAdmin


    [cssmile said:]

    it works now. thank you sooooooo much :)
    #CPLEXOptimizers
    #DecisionOptimization