Omnet++ 如何在Omnet上使用LEDA图形库++;项目?
我正在尝试使用Omnet++4.2.2中的LEDA-6.3库。我安装了LEDA,并在Ubuntu终端上运行了一个简单的程序。但是,当我将代码移植到Omnet++时,它失败了。下面是我的简单代码Omnet++ 如何在Omnet上使用LEDA图形库++;项目?,omnet++,Omnet++,我正在尝试使用Omnet++4.2.2中的LEDA-6.3库。我安装了LEDA,并在Ubuntu终端上运行了一个简单的程序。但是,当我将代码移植到Omnet++时,它失败了。下面是我的简单代码 #include <LEDA/graph/graph.h> #include <omnetpp.h> class cLeda : public cSimpleModule { protected: virtual voi
#include <LEDA/graph/graph.h>
#include <omnetpp.h>
class cLeda : public cSimpleModule
{
protected:
virtual void initialize();
};
Define_Module(cLeda);
void cLeda::initialize()
{
EV << "TestLEDA";
graph g;
g.read("nsfnet.txt");
EV << "No. nodes = " <<g.number_of_nodes() << endl;
}
我很感激任何能帮助我实现这一目标的想法。非常感谢。OMNeT++项目通常使用Makefile。尝试将
LEDA
库添加为Makefrag
。
转到Project Properties
,选择OMNeT++
|Makemake
|选择src
|选项
|自定义
|Makefrag
,然后编写:
INCLUDE_PATH += -I/home/grsst/LEDA-6.3/incl
LIBS += -L/home/grsst/LEDA-6.3 -lleda
不客气。你能把这个答案作为你问题的答案吗?这将对其他人有帮助。嗨,杰兹,我想把我的问题标记为“不知道如何解决”,你能告诉我怎么做吗?谢谢描述了如何接受答案以及如何投票。
INCLUDE_PATH += -I/home/grsst/LEDA-6.3/incl
LIBS += -L/home/grsst/LEDA-6.3 -lleda