gpt4 book ai didi

c++ - 错误 : iostream. h 由于包含 cplex

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:29:35 24 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 12.04 的 eclipse 中使用 cplex,但是当我包含 ilocplex.h 时,出现以下错误

/opt/ibm/ILOG/CPLEX_Studio124/concert/include/ilconcert/ilosys.h:360:22: fatal error: iostream.h: No such file or directory

仅有的两个include写法如下:

#include <ilcplex/ilocplex.h>
#include <iostream>

如果有人能帮助我,我将不胜感激。

最佳答案

在 ILOG 的 Concert 库首次发布时,旧的 iostream.h header 在 C++ 编译器中仍然很常见,但它支持标准的 iostream 库。要使用标准头文件和库,您需要定义 IL_STD预处理器符号。在 Eclipse/C++ 中定义预处理器指令的说明可以在此 question 中找到.

关于c++ - 错误 : iostream. h 由于包含 cplex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22411260/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com