无法将.ned文件与其.h和.cc文件连接

  • 本文关键字:文件 cc 连接 ned omnet++
  • 更新时间 :
  • 英文 :


我有以下简单模块
PythonConnection.ned

simple PythonConnection {
@class(PythonConnection);
// my code
}

PythonConnection.h

#include <omnetpp.h>
class PythonConnection : public omnetpp::cSimpleModule {
//my code
}

PythonConnection.cc

#include "PythonConnection.h"
Define_Module(PythonConnection);
void PythonConnection::initialize() {
//my code
}

所有这些都位于同一目录中。

我正在圆圈中导入这个简单的模块.ned文件

package circles;
import PythonConnection;
network circles
{
submodules:
python_connection: PythonConnection;
}

但我不明白为什么我一直得到

A runtime error occurred:
Class "PythonConnection" 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) circles (id=1), during network setup

当我启动程序时。有人能帮忙吗?

我的问题是我创建了General项目。要使其发挥作用,需要OMNeT++项目