0
votes

This question is similar to Veins_inet: undefined reference to `__imp__ZTVN5Veins17VeinsInetMobilityE' when building in OMNet 5.1.1

I am running the latest versions of Veins, Sumo, Omnet, and Inet at the time of posting. I have created a project to run the veins_inet example. This project reference both INET and Veins. However, when running the example, I get this as part of the stack trace:

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

Based on the stack trace, I have pinpointed the possible problem, which is referring to this segment of code, but I do not know of any solution as this is part of the source code.

#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);
});

In VEINS, there is SignalManager.h under src>veins>modules>utility, which contains the reference from the code above.

    class VEINS_API SignalCallbackListener

Other than that, I feel I have exhausted all possible solutions and exploration.

Edit: I can build INET and Veins with no errors.

1

1 Answers

1
votes

I was running unstable builds of Veins and Inet. Updating these fixed the problem.