Class "simpleModule" 在 omnetpp 中找不到

Class "simpleModule" not found in omnetpp

我正在用 omnet++ 编写我自己的简单模块。

在 omnet IDE 中,我创建了三个简单的模块。

之后,我使用这些模块创建了 "network"。

它构建成功,但每当我尝试模拟它时它显示

Error in module (cModule) NetworkTopologyOnly (id=1) during network setup: Class "mySimplemodule2" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().

我应该怎么做才能使用自己的简单模块成功模拟?

除了class或模块注册问题,这也可能是因为您没有实现它的所有功能(如果您在 omnet++ class 中定义了任何非虚函数原型) .