运行veins_inet示例 - 未定义的引用的 Omnet++ 问题



这个问题类似于Veins_inet:在OMNet 5.1.1中构建时未定义对"__imp__ZTVN5Veins17VeinsInetMobilityE"的引用

在发布时,我正在运行最新版本的Veins,Sumo,Omnet和Inet。我创建了一个项目来运行veins_inet示例。该项目参考了INET和Veins。但是,在运行示例时,我将其作为堆栈跟踪的一部分:

../out/gcc-release/src/veins_inet/VeinsInetManager.o:VeinsInetManager.cc:(.text+0x63a): undefined reference to `__imp__ZTVN5veins22SignalCallbackListenerIPN7omnetpp7cObjectEEE'

根据堆栈跟踪,我已经查明了可能的问题,即引用这段代码,但我不知道任何解决方案,因为这是源代码的一部分。

#if INET_VERSION >= 0x0402
signalManager.subscribeCallback(this, TraCIScenarioManager::traciModulePreInitSignal, [this](SignalPayload<cObject*> payload) {
cModule* module = dynamic_cast<cModule*>(payload.p);
ASSERT(module);
// The INET visualizer listens to model change notifications on the
// network object by default. We assume this is our parent.
cModule* root = getParentModule();
auto* notification = new inet::cPreModuleInitNotification();
notification->module = module;
root->emit(POST_MODEL_CHANGE, notification, NULL);
});

在 VEINS 中,src>veins>modules>utility 下有 SignalManager.h,其中包含上述代码的引用。

class VEINS_API SignalCallbackListener

除此之外,我觉得我已经用尽了所有可能的解决方案和探索。

编辑:我可以毫无错误地构建INET和静脉。

我正在运行不稳定的 Veins 和 Inet 版本。更新这些解决了问题。

最新更新