Problem in defining a module in omnetpp

主宰稳场 提交于 2019-12-11 06:57:27

问题


Hi I'm writing a project in omnet, but I'm stuck on defining my own module. On https://github.com/lbedogni/Basic-Broadcast-Simulation there is the full code. The problem is that i get the following error message:

<!> Error in module (cCompoundModule) scenario.host[0] (id=4) at event 
\#1, t=0: Class "basic::Flooding" 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(). 

But I defined it via Define_Module().

I think it could possibly be a package related problem, but didn't find a solution. Any idea?

Thanks


回答1:


I am not familiar with it, but from package.ned

// designate the NED package of this folder package basic;

// namespace of module C++ classes @namespace(basic);

@license(LGPL);

you need to be in namespace basic I guess?

And you flooding class is not defined within namespace basic?



来源:https://stackoverflow.com/questions/4385469/problem-in-defining-a-module-in-omnetpp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!