OMNeT compilation problem

1,728 views
Skip to first unread message

Ivo Calado

unread,
Nov 24, 2016, 7:09:23 AM11/24/16
to omn...@googlegroups.com
Hi fellows, i'm dealing with a strange problem to build omnet with osg support enabled. Whenever I try to build the compilation stops with following error message:

Creating executable: out/gcc-release//osg-earth
out/gcc-release//OsgEarthScene.o: In function `OsgEarthScene::initialize()':
OsgEarthScene.cc:(.text+0x4f3): undefined reference to `omnetpp::cOsgCanvas::setEarthViewpoint(osgEarth::Viewpoint const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:118: out/gcc-release//osg-earth] Error 1
make[2]: Leaving directory '/home/ivocalado/opt/omnetpp-5.0/samples/osg-earth'
make[1]: *** [Makefile:117: osg-earth] Error 2
make[1]: Leaving directory '/home/ivocalado/opt/omnetpp-5.0'
make: *** [Makefile:23: allmodes] Error 2

However, during the configure step the support to openscenegraph and osgwarth was conrrectly detected as shown in the generated config.log presented below.

confi.log
configure:5110: checking for OpenSceneGraph with CFLAGS=" -O2 -DNDEBUG=1 -fPIC  -fno-stack-protector " LIBS="-losg -losgGA -losgViewer -losgQt -lOpenThreads"
configure:5124: g++ -o conftest  -O2 -DNDEBUG=1 -fPIC  -fno-stack-protector     -Wl,-rpath,$(OMNETPP_LIB_DIR) -Wl,-rpath,$(OMNETPP_TOOLS_DIR)/lib -Wl,-rpath,. conftest.cpp -losg -losgGA -losgViewer -losgQt -lOpenThreads >&5
configure:5124: $? = 0
configure:5125: result: yes
configure:5153: checking for osgEarth with CFLAGS=" -O2 -DNDEBUG=1 -fPIC  -fno-stack-protector " LIBS="-losgEarth -losgEarthUtil"
configure:5167: g++ -o conftest  -O2 -DNDEBUG=1 -fPIC  -fno-stack-protector     -Wl,-rpath,$(OMNETPP_LIB_DIR) -Wl,-rpath,$(OMNETPP_TOOLS_DIR)/lib -Wl,-rpath,. conftest.cpp -losgEarth -losgEarthUtil >&5
configure:5167: $? = 0
configure:5168: result: yes

Any tip about how to fix it?

[]'s

--
Prof. Ivo Calado, D.Sc.
Instituto Federal de Alagoas - http://ifal.edu.br/
Site: http://sigaa.ifal.edu.br/sigaa/public/docente/portal.jsf?siape=1819085

Quidquid latine dictum sit, altum viditur

Putt's Law:
       Technology is dominated by two types of people:
               Those who understand what they do not manage.
               Those who manage what they do not understand.

Attila Török

unread,
Nov 24, 2016, 7:17:06 AM11/24/16
to OMNeT++ Users
Hi!

Just a quick guess: Have you tried building OMNeT++ in the same directory before, without OSG support enabled/detected? If yes, maybe doing a clean build by running a make cleanall before configuring will help.
If not, make sure all the packages required for OSG and osgEarth support are correctly installed, and are the right versions.
Check with point section 5.3.1. of the Installation Manual for details on this.
Well, let me quote that section to make it easier for you:

"To use Qtenv with 3D visualization support, install the development packages for Qt4,
OpenSceneGraph (3.2) and the osgEarth (2.5 or later) packages:

$ sudo apt-get install qt4-qmake libqt4-dev libqt4-opengl-dev \
 openscenegraph libopenscenegraph-dev openscenegraph-plugin-osgearth \
 osgearth osgearth-data libosgearth-dev"

Attila

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Ivo Calado

unread,
Nov 24, 2016, 9:24:18 AM11/24/16
to omn...@googlegroups.com
Hi Attila,
    it worked! I ran make cleanall

Johnson Olanrewaju

unread,
Jun 8, 2018, 8:23:43 AM6/8/18
to OMNeT++ Users
You guys are so wonderful. I got all my problems solved. Thanks
Reply all
Reply to author
Forward
0 new messages