Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Concert compilation issue on Linux

    Posted 03/19/11 04:21 AM

    Originally posted by: SaqibIlyas


    Hi guys
    I don't have write permissions under /opt/cplex122, so I couldn't build the example files on a Linux machine. I just copied a few lines into a file ilocpp.cpp:

    #include <ilcplex/ilocplex.h>
    ILOSTLBEGIN
    int
    main (int argc, char **argv)
    {
       IloEnv env;
       try {
          IloModel model(env);
          IloCplex cplex(env);
            }
            catch(Exception ex)
            {
            }
    }
    


    Based on the command line spitted by the Makefile for the examples, I then used the following command to try and build the file:

    g++ -c -m32 -fPIC ilocp.cpp -I/opt/cplex122/cplex/include -I/opt/cplex122/concert/include -Wno-deprecated -o ilocpprb -D ILO_LINUX -D ILOSTRINGSTL -D ILO_USESTL
    


    However, I get a compilation error. It says:

    /opt/cplex122/concert/include/ilconcert/ilosys.h:402:23: error: strstream.h: No such file or directory
    


    I looked at ilosys.h, and as you can see, I tried to define a few pre-processor symbols to try and force the compiler to

    #include <strstream> 
    instead of 
    #incldue <strstream.h>
    


    What to do?
    Thanks and best regards
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Concert compilation issue on Linux

    Posted 03/20/11 05:32 AM

    Originally posted by: SystemAdmin


    I think the only -D-option you need is '-DIL_STD'. Does this work?
    g++ -m32 -fPIC -I/opt/cplex122/cplex/include -I/opt/cplex122/concert/include -DIL_STD -Wno-deprecated -c -o ilocpprb.o ilocpp.cpp
    

    You can also copy the examples to a place at which you have write permission and compile them there.
    #CPLEXOptimizers
    #DecisionOptimization