【发布时间】:2019-09-02 07:49:28
【问题描述】:
我是 OMNeT++ 和 C++ 的新手
我想重现 libPTP 的环境: https://omnetpp.org/download-items/libPTP.html
我无法将项目 OMNeT_Utils 设置为 libPTP 的依赖项。 https://github.com/w-wallner/OMNeT_Utils
问题: 我已将 OMNeT_Utils 导入到与 INET 相同的工作区中。 如果我尝试构建项目,我会收到文件 CallableModule.h “expected class-name before ',' 标记的控制台错误。
cSimpleModule 不知何故无法识别。
这似乎是一个链接问题。 有什么想法吗?
使用 Omnet++ 5.6 网内 4.1 Linux Debian 9
我尝试包含路径 ../omnetpp-5.4.1/include/omnetpp 其中 csimplemodule.h 与 C/C++ General --> Paths and Symbols 一起使用。 但是没有效果。 csimplemodule.h 包含在 omnetpp.h 中
CallableModule.h
...
#include "ICallableBase.h"
#include <omnetpp.h>
#include <stack>
...
class cCallableModule : public cSimpleModule, public virtual ICallableBase
{
private:
// Resources
std::stack<cMethodCallContextSwitcher *> ContextStack;
....
};
csimplemodule.h
class SIM_API cSimpleModule : public cModule //implies noncopyable
{
friend class cModule;
friend class cSimulation;
...
}
【问题讨论】: