无法将INET库正确链接到omnet项目Ubuntu 18

时间:2019-05-27 09:14:55

标签: omnet++ inet

我正在使用ubuntu 18,并且正在尝试编译链接INET库的项目。在使用ubuntu 16时,它工作正常。但是现在,在ubuntu 18上出现了以下错误:

我已经将inet库添加到参考项目中。

myApp.cc
HelloMsg_m.cc
XedMsg_m.cc
Creating executable: out/gcc-release//SaaS
../inet/src/libINET.so : undefined reference to « osg::StateSet::setRenderingHint(int) »
../inet/src/libINET.so : undefined reference to  « osgEarth::MapNode::getMapSRS() const »
../inet/src/libINET.so : undefined reference to  « osg::Group::removeChildren(unsigned int, unsigned int) »
../inet/src/libINET.so : undefined reference to « osg::Object::getUserData() »
../inet/src/libINET.so : undefined reference to « osg::AutoTransform::setNormal(osg::Vec3f const&) »
../inet/src/libINET.so : undefined reference to  « osg::Texture::setFilter(osg::Texture::FilterParameter, osg::Texture::FilterMode) »
../inet/src/libINET.so : undefined reference to « osg::NodeVisitor::apply(osg::Node&) »
../inet/src/libINET.so : undefined reference to  « vtable for osg::Array »
../inet/src/libINET.so : undefined reference to  « osgEarth::GeoTransform::GeoTransform() »
../inet/src/libINET.so : undefined reference to  « typeinfo for osg::Group »
../inet/src/libINET.so : undefined reference to « osg::Shader::Shader(osg::Shader::Type) »
../inet/src/libINET.so : undefined reference to « osg::NodeVisitor::apply(osg::ProxyNode&) »
../inet/src/libINET.so : undefined reference to « osg::Node::getOrCreateStateSet() »
../inet/src/libINET.so : undefined reference to « osg::Texture2D::Texture2D() »
../inet/src/libINET.so : undefined reference to « osg::NodeVisitor::apply(osg::OcclusionQueryNode&) »
../inet/src/libINET.so : undefined reference to « osg::StateSet::setMode(unsigned int, unsigned int) »
../inet/src/libINET.so : undefined reference to « osg::BufferData::~BufferData() »
../inet/src/libINET.so : undefined reference to « osg::StateSet::getAttribute(osg::StateAttribute::Type, unsigned int) »
../inet/src/libINET.so : undefined reference to  « typeinfo for osg::NodeVisitor »
../inet/src/libINET.so : undefined reference to « osgText::TextBase::setDrawMode(unsigned int) »
../inet/src/libINET.so : undefined reference to « osg::Transform::Transform(osg::Transform const&, osg::CopyOp const&) »
../inet/src/libINET.so : undefined reference to « osg::Object::Object(osg::Object const&, osg::CopyOp const&) »
../inet/src/libINET.so : undefined reference to  « vtable for osg::DrawArrays »
../inet/src/libINET.so : undefined reference to « osg::Referenced::Referenced(bool) »
../inet/src/libINET.so : undefined reference to « vtable for osg::Box »
../inet/src/libINET.so : undefined reference to « osg::StateSet::setAttribute(osg::StateAttribute*, unsigned int) »
../inet/src/libINET.so : undefined reference to « osg::StateSet::setAttributeAndModes(osg::StateAttribute*, unsigned int) »
../inet/src/libINET.so : undefined reference to « typeinfo for osg::Geode »
../inet/src/libINET.so : undefined reference to « osg::Group::releaseGLObjects(osg::State*) const »
../inet/src/libINET.so : undefined reference to  « osg::Geode::Geode() »
../inet/src/libINET.so : undefined reference to « osg::Geometry::addPrimitiveSet(osg::PrimitiveSet*) »
../inet/src/libINET.so : undefined reference to « osg::NodeVisitor::apply(osg::PagedLOD&) »
../inet/src/libINET.so : undefined reference to « osg::LineStipple::LineStipple() »
.
.
.

collect2: error: ld returned 1 exit status
Makefile:104: recipe for target 'out/gcc-release//SaaS' failed
make: *** [out/gcc-release//SaaS] Error 1

有人可以帮我这个忙吗,我一直在努力解决问题三天,没有成功。

1 个答案:

答案 0 :(得分:0)

您应该使用最新版本的OMNeT ++(5.4.1,很快也会发布5.5)和INET 3.6.5或INET 4.1.1。

osgEarth更改了其API,并且INET的旧版本不再编译。

另一种解决方案是在不需要的情况下禁用OMNeT ++中的osg和osgEarth支持(请参见configure.user文件),并在项目中实现3D可视化。