Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Using CPLEX in MS VC++ 2010

    Posted 07/16/12 08:22 PM

    Originally posted by: FHPG_Md_Arshi_Islam


    Hi,
    I am a beginner in CPLEX. I just want to know how to use CPLEX in MS VC++ 2010. I have tried to run the examples and build new project following the instructions but i failed. I get this error saying :

    "1>test.cpp(33): fatal error C1083: Cannot open include file: 'ilcplex/ilocplex.h': No such file or directory"

    Can anyone please help me to fix this problem

    Thank you
    Arshi
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Using CPLEX in MS VC++ 2010

    Posted 07/17/12 02:28 AM

    Originally posted by: SystemAdmin


    The CPLEX installation comes with a file c_cpp.html. Please refer to this file to learn how to set up Visual Studio for use with CPLEX.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Using CPLEX in MS VC++ 2010

    Posted 07/17/12 05:03 PM

    Originally posted by: FHPG_Md_Arshi_Islam


    Hi,
    Thank you.
    I have tried using c_cpp.html file. I have some problems in this two steps.

    Select Preprocessor:
    Add IL_STD to the Preprocessor Definitions field. This defines the macro IL_STD which is needed to use the STL.

    Select Input and then select Additional Dependencies. Add the files:
    cplex124.lib
    ilocplex.lib
    concert.lib

    In both cases i could not add files. So what i did i just type 'IL_STD' after pressing edit and in second case i typed the name of those three files after pressing edit in Additional Dependency field.

    finally i got the error message:
    1>concert.lib(iloconstraint.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

    Could you please help me to fix this??
    Regards
    Arshi
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Using CPLEX in MS VC++ 2010

    Posted 07/18/12 04:04 AM

    Originally posted by: SystemAdmin


    It looks like your are using 64bit libraries when compiling for a 32bit machine. Is your machine 32bit or 64bit? In the project settings, did you reference the 32bit or 64bit libraries?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Using CPLEX in MS VC++ 2010

    Posted 07/18/12 04:06 PM

    Originally posted by: FHPG_Md_Arshi_Islam


    Hi,
    My machine is 64 bit. i also followed the following steps as mentioned in c_cpp.html:

    Select Linker in the Configuration Properties tree.
    Select General and then select Additional Library Directoriess. Add the files:
    <CPLEXDIR>\lib\x86_windows_vs2010\stat_mta
    <CONCERTDIR>\lib\x86_windows_vs2010\stat_mta

    Is there anything I need to do for referencing the 32bit or 64bit libraries?

    Regards,
    Arshi
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Using CPLEX in MS VC++ 2010

    Posted 07/19/12 03:09 AM

    Originally posted by: SystemAdmin


    On a 64bit machine I think you should be using the x64_windows_vs2010 libraries instead of the x86_windows_2010 ones. So you should change the names of the directories for the included libraries.
    #CPLEXOptimizers
    #DecisionOptimization