我是CPLEX C ++的新用户。我想在Linux上编译一个C ++程序。我为C程序尝试了以下命令行,它运行良好。但我无法编译C ++程序。
我使用的命令行:
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
错误:
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
......还有更多像这样的错误。
我的命令应该如何改变才能编译C ++程序? 任何帮助,将不胜感激。