在 omnet++ 中构建 INET 时出错

Error Building INET in omnet++

我正在 Ubuntu 工作,我已经安装了最新版本的模拟器 omnet++ 5.3。我已经下载了 INET Framework 3.6.4,在将它导入 omnet++ 后,我在构建它时遇到错误,即:

inet/common/geometry/common/CoordinateSystem.cc:21:10: fatal error: osgEarthUtil/ObjectLocator: No such file or directory #include <osgEarthUtil/ObjectLocator> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [../out/gcc-release/src/inet/common/geometry/common/CoordinateSystem.o] Error 1 Makefile:1330: recipe for target '../out/gcc-release/src/inet/common/geometry/common/CoordinateSystem.o' failed make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/noelia/Downloads/inet/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2

你知道为什么会这样吗?还是版本问题?如何包含丢失的文件?

使用 Ubuntu 18.04,我已经能够通过遵循 torokati44's "cherry-picking". His post links to this 提交而没有错误地构建 INet。以下是我执行的步骤:

  1. 下载 INet 的最新开发版本(即 inet-3.99.3);
  2. 如果您在 OMNeT 中安装了 INet,请启动 OMNeT 并在项目资源管理器中删除 inet。在从 OMNeT 的项目浏览器层次结构中删除后,检查 "Delete project contents on disk (cannot be undone)" 或将 inet 文件夹移动到其他地方
  3. 解压缩从步骤 1) 下载的 inet,并将其放置在与步骤 2) 中删除的相同的位置);
  4. 用 torokati44 提交的 fccb335 中的文件替换这 4 个文件(见上文)。我建议您使用“.bak”扩展名而不是 removing/replacing 重命名文件,以防万一;
  5. 在 OMNeT 中,导入新的 inet(文件 > 导入... > 常规 > 现有项目到工作区)。 不要 将项目复制到工作区中,因为 INet 已在步骤 3 中移动到工作区中);
  6. 您应该能够构建 INet,希望它能正常工作。

希望这对你有用!干杯。