Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/16/10 03:20 PM

    Originally posted by: alberto85


    Hi everybody, I'm trying to compile a Windows Form Application but the compiler gives me this linker error:
    LNK2001. Probably there is a particular setting of compiler/linker parameters but I don't know how to set them.
    Is there anybody that can help me, please?

    (Sorry, my english is not good)
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/17/10 08:10 AM

    Originally posted by: Didier Vidal


    Alberto,

    I moved this question to mathematical programming/ILOG CPLEX where I hope you will find more people specialized in CPLEX to help you.

    If you are using C++ as programming language, my recommendation would be that you look at a file mptable.html located in the installation directory of CPLEX, and that you check that Visual Studio 2008 is listed in the list of compilers that CPLEX 10.1 supports.

    Regards,

    Didier Vidal.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/17/10 08:23 AM

    Originally posted by: SystemAdmin


    Linker error LNK2001 is "unresolved external symbol", correct?
    Can you please tell us what symbol the linker is complaining about?
    It would be best if you posted the full error message.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/18/10 02:43 AM

    Originally posted by: alberto85


    Thanks everybody for your replies,
    The error appears when I try to create a new Windows Application Form in Visual Studio (when I create console application the problem doesn't appear). When I insert an "#include <ilcplex/ilocplex.h>" the compiler generates a lots of these linker error:

    1>cplexresolver.obj : error LNK2001: simbolo esterno "public: virtual void __clrcall IloException::print(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?print@IloException@@$$FUBMXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) non risolto
    1>cplexresolver.obj : error LNK2001: simbolo esterno "public: virtual __clrcall IloRtti::~IloRtti(void)" (??1IloRtti@@$$FUAM@XZ) non risolto
    ...

    I set the compiler using the information given in c_cpp.html.

    Thanks,
    Alberto
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/18/10 02:58 AM

    Originally posted by: SystemAdmin


    Shouldn't you be using libraries from x86_windows_vs2008 instead of x86_.net2005_8.0 when using Visual Studio 2008? At least that is what mptable.html suggests.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/18/10 03:53 AM

    Originally posted by: alberto85


    Thankyou Daniel for your reply,
    I modified my project properties->linker->input->additional dependencies from x86_.net2005_8.0 to x86_windows_vs2008 as you said, but the problem remains.
    I try to include also the msvcrt.lib but it occurs another linker problem "lnk1313" (as you can see in the attachment).

    After that I modify my project proprieties->general->Common Language Runtime Support from /clr:pure to /clr and the compiler doesn't give me any problem but when I execute the application this error occurs:

    An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module.
    Additional information: The type initializer for "Module" threw an exception.

    Regards,
    Alberto
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/18/10 04:55 AM

    Originally posted by: SystemAdmin


    Unfortunately, I am not a Windows pro :-(
    I'd run the program through the debugger and look at the exception backtrace. Maybe this gives you some more information about what is going wrong.
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX10.1 & Visual Studio 2008: Application Windows Form

    Posted 05/18/10 05:05 AM

    Originally posted by: alberto85


    I think the problem is in compiler setting so I'll try to modify some parameters.
    thankyou for your interesting in my problem Daniel,
    Have a nice day,
    Alberto
    #CPLEXOptimizers
    #DecisionOptimization