omnet++ - 更新到 Veins 5 时出现编译错误
问题描述
我已经用 Omnet++ 5.4.1 安装了 Veins 5。我按照这里的建议将我的静脉 4 项目升级到静脉 5
但是,我面临一个新问题,即编译器看不到 Veins 库。我得到的错误如下: undefined reference toVeins::DemoBaseApplLayer::initialize(int)
我还将静脉作为参考项目包括在内,并在 Makemake 选项中更新了包含路径以
"C:\veins5\veins-veins-5a1\src"
我是否缺少任何进一步的配置?
我在 Windows 操作系统下运行 Veins。
解决方案
Veins DemoBaseApplLayer
5 alpha 1 不准备用作其他模拟应用层的基类。这可以通过更改其源代码来纠正,如下所示:
在src/veins/modules/application/ieee80211p/DemoBaseApplLayer.h
第 56 行,更改
class DemoBaseApplLayer : public BaseApplLayer {
至
class VEINS_API DemoBaseApplLayer : public BaseApplLayer {
推荐阅读
- c++ - 为什么 C++ 11 将 operator bool 添加到 ios 类
- git - 识别在分支上完成的提交
- reactjs - react-google-maps 在 StrictMode 下不会卸载组件
- c# - 加载 JSON 文件会导致序列化错误
- c# - 用 appsettings.Production.json 中的设置覆盖 appsettings.json 中的数组设置
- javascript - 点击事件在反应的地图上不可用
- php - 如何从 Yii 1.1 中的查询中获取数组值
- angular - 如何向我的 Angular 7 应用程序添加一个简单的对话框?
- android - HTTP 连接崩溃
- c++ - 不同于按值传递和按 const ref 传递的程序集