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