我已遵循以下安装说明:
https://omnetpp.org/doc/omnetpp/InstallGuide.pdf
然后按照提到的说明进行操作:
http://vikashmainanwal.blogspot.co.il/2014/10/omnet-simulator-installation-steps-in.html
安装模拟器IDE本身。
当到达该make
阶段时,会产生以下错误:
Creating shared library: /home/adiel/Downloads/omnetpp-5.0/lib/gcc/liboppqtenv.so
make[2]: Leaving directory '/home/adiel/Downloads/omnetpp-5.0/src/qtenv'
cd /home/adiel/Downloads/omnetpp-5.0/src/envir && make opp_run_executable
make[2]: Entering directory '/home/adiel/Downloads/omnetpp-5.0/src/envir'
Creating executable: /home/adiel/Downloads/omnetpp-5.0/out/gcc-release/src/envir/opp_run_release
/home/adiel/Downloads/omnetpp-5.0/lib/gcc/liboppqtenv.so: undefined reference to `osgViewer::CompositeViewer::readConfiguration(std::string const&)'
/home/adiel/Downloads/omnetpp-5.0/lib/gcc/liboppsim.so: undefined reference to `osg::Node::getDescription(unsigned int)'
/home/adiel/Downloads/omnetpp-5.0/lib/gcc/liboppqtenv.so: undefined reference to `osgEarth::Viewpoint::Viewpoint(std::string const&, double, double, double, double, double, double, osgEarth::SpatialReference const*)'
collect2: error: ld returned 1 exit status
Makefile:118: recipe for target '/home/adiel/Downloads/omnetpp-5.0/out/gcc-release/src/envir/opp_run_release' failed
make[2]: *** [/home/adiel/Downloads/omnetpp-5.0/out/gcc-release/src/envir/opp_run_release] Error 1
make[2]: Leaving directory '/home/adiel/Downloads/omnetpp-5.0/src/envir'
Makefile:71: recipe for target 'base' failed
make[1]: *** [base] Error 2
make[1]: Leaving directory '/home/adiel/Downloads/omnetpp-5.0'
Makefile:23: recipe for target 'allmodes' failed
make: *** [allmodes] Error 2
gcc --version
输出:
gcc (Ubuntu 4.9.4-2ubuntu1~16.04) 4.9.4
有人可以帮忙吗?
答案1
我遇到了同样的问题。因为我不需要 3D 可视化,所以我构建 Omnet++ 时不使用 osgEarth 和 OpenSceneGraph(以及 QtEnv):
./configure WITH_OSGEARTH=no WITH_OSG=no WITH_QTENV=no
make -j3
通过构建 Omnet++,我能够执行样本。