ubuntu - 在 omnet++ 中构建 INET 时出错
问题描述
我在 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 的 "cherry-picking" 毫无错误地构建 INet 。他的帖子链接到这个提交。以下是我执行的步骤:
- 下载INet的最新开发版本(即 inet-3.99.3);
- 如果您在 OMNeT 中安装了 INet,请启动 OMNeT 并在项目资源管理器中删除 inet。选中“删除磁盘上的项目内容(无法撤消)”或从 OMNeT 中的项目资源管理器层次结构中删除后将inet 文件夹移至其他位置;
- 将步骤1)下载的inet解压,并将其放在与步骤2)中删除的相同的位置;
- 用 torokati44 提交的 fccb335 中的文件替换 4 个文件(见上文)。我建议您使用“.bak”扩展名重命名文件,而不是删除/替换它们,以防万一;
- 在 OMNeT 中,导入新的 inet(文件 > 导入... > 常规 > 现有项目到工作区)。不要将项目复制到工作区中,因为 INet 已在步骤 3) 中移动到工作区中;
- 您应该能够构建 INet,它有望工作。
希望这对你有用!干杯。
推荐阅读
- node.js - 禁用流控制以测试 Angular 应用程序时量角器生成错误
- python - 累积方法中的元素引用
- laravel - 如何解决 Laravel 中的以下错误以及如何知道 SessionHandlerInterface 的文件路径?
- javascript - 在 jQuery 中,使用 e.preventDefault() 不会将复选框状态显示为已选中
- ionic-framework - 无法在 Ionic 3 中关闭浏览器
- swift - 如何快速将视频数据保存到文档目录?
- ios - 过滤嵌套数组和字典
- c - 正在跳过一个特定的变量引用
- android - 在谷歌地图上查看位置发送纬度和经度
- python - Keras - UpSampling2D 层似乎返回 2D 张量而不是 4D