bwhou

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

报错类型

Class "ConnDef" 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() -- in module (omnetpp::cModule) AutoNetwork (id=1), during network setup
这是一个幽灵级问题,看着配置都没问题,编译也不报错,运行仿真就报错!

原因

.ned文件和.cc文件没有绑定。

解决方法

.CC文件
通常情况我们只在.cc文件绑定.ned文件,但是编译器没有识别.ned文件绑定到那个class。

所以我们在.ned文件中需要绑定.cc文件
.ned文件
这样就可以解决运行仿真时找不到类的问题。

完结撒花!!!

转载请说明出处!!!

posted on 2025-08-07 15:18  bwhou  阅读(47)  评论(0)    收藏  举报