I am a new user of CPLEX C++. I want to compile a C++ program on Linux. I tried the following command line for a C program and it works well. But I cannot compile a C++ program.
The command line which I use:
g++ hello.cpp \
-I/<path>/CPLEX/CPLEX_Studio1261/cplex/include \
-I<path>/CPLEX/CPLEX_Studio1261/concert/include \
-L/<path>/CPLEX/CPLEX_Studio1261/cplex/lib/x86-64_linux/static_pic \
-L/<path>/CPLEX/CPLEX_Studio1261/concert/lib/x86-64_linux/static_pic \
-lilocplex -lconcert -lcplex -lm -lpthread
And errors:
In file included from
<'path'>/CPLEX/CPLEX_Studio1261/concert/include/ilconcert/iloenv.h:21,
error: iostream.h: No such file or directory
<'path'>/CPLEX/CPLEX_Studio1261/concert/include/ilconcert/ilosys.h:376:21: error: fstream.h: No such file or directory
... and many more errors like this.
What should I change in my command to be able compile C++ programs as well? Any help would be appreciated.