Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Setting up CPLEX12.5 64bit on Visual Studio 2010

    Posted 06/08/13 12:39 PM

    Originally posted by: dianacobos


    Hi everybody!


    I have a project developed with 32 bit CPLEX on VS2005 without problems. Now I have Visual Studio 2010 installed and try to build my own applications to call CPLEX12.5 64bit. I set up my project configurations exactly the same way as the c_cpp.html shows in the documentation. I can compile without any problem. But linking is full of errors. I select from Configuration manager the project platform as X64. There are 14 errors like this:
     
    Main.obj : error LNK2019: unresolved external symbol __imp__CPXcloseCPLEX@4 referenced in function _main

    Can anyone help? Or show how you setup Cplex 64bit with VS2010? Thank you in advance.

    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Setting up CPLEX12.5 64bit on Visual Studio 2010

    Posted 06/10/13 07:56 AM

    This looks like a 32bit/64bit mismatch in your project setup. It looks like you have installed the 64bit CPLEX libraries but the Main.obj file was compiled in 32bit mode. Can you please double-check that the configuration is 64bit and Main.obj is compiled for 64bit?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Setting up CPLEX12.5 64bit on Visual Studio 2010

    Posted 06/10/13 12:57 PM

    Originally posted by: dianacobos


    Hi! tanks for your answer!

    How or where can I check  that the configuration is 64bit and Main.obj is compiled for 64bit?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Setting up CPLEX12.5 64bit on Visual Studio 2010

    Posted 06/11/13 10:18 AM

    The "Active solution platform" in your configuration manager should be set to "x64" (see attached screenshot). Moreover, when doing "Build->Rebuild Solution" the output should start with something like

    ------ Build started: Project: <your project>, Configuration: Debug x64

    (or Release x64). I am not a Windows expert but I also found the dumpbin utility helpful in cases like this.

    dumpbin /headers Main.obj

    should tell you that the file is for a 64bit machine and

    dumpbin /symbols Main.obj

    should only list __imp_ symbols without trailing @N.

    Finally, the build log file should indicate that you were using a 64bit compiler. The default location of the build log file is $(IntDir)\$(MSBuildProjectname).log (see Project->Properties->Configuration Properties->General->Build Log File). Maybe you can clean your solution, rebuild it and then show the build log here.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Setting up CPLEX12.5 64bit on Visual Studio 2010

    Posted 06/11/13 02:08 PM

    Originally posted by: dianacobos


    Tank you very much! The problem was solved!

    I really appreciate your help!


    #CPLEXOptimizers
    #DecisionOptimization