2010-12-08 14 views
1

嗨 我正在omnet中編寫一個項目,但我一直在定義自己的模塊。在https://github.com/lbedogni/Basic-Broadcast-Simulation有完整的代碼。問題是,我得到了以下錯誤消息:在omnetpp中定義一個模塊的問題

<!> 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(). 

但我通過Define_Module()定義它。

我認爲它可能是一個包相關的問題,但沒有找到解決方案。任何想法?

感謝

回答

2

我不熟悉它,但是從package.ned

//指定該文件夾的NED包 包基本;

//模塊C++類的名稱空間 @namespace(basic);

@license(LGPL);

你需要在命名空間基本我猜?

你泛洪類沒有在名稱空間基礎內定義?

+0

你是完全正確的。這解決了我的問題。謝謝。 – lbedogni 2010-12-08 11:19:04