首页 > 解决方案 > 更新到 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。

标签: omnet++veins

解决方案


Veins DemoBaseApplLayer5 alpha 1 不准备用作其他模拟应用层的基类。这可以通过更改其源代码来纠正,如下所示:

src/veins/modules/application/ieee80211p/DemoBaseApplLayer.h第 56 行,更改

class DemoBaseApplLayer : public BaseApplLayer {

class VEINS_API DemoBaseApplLayer : public BaseApplLayer {

推荐阅读