How to use osg library properly in omnet project

184 views
Skip to first unread message

John Blue

unread,
Apr 19, 2021, 12:38:59 PM4/19/21
to OMNeT++ Users

Hi, I am relatively new to omnet++ and OpenSceneGraph (OSG). I want to do some simulations with networks and graphics. I have seen from the examples e.g. osg-satellite in .cc files the first line is this definition : #if defined(WITH_OSG) && defined(WITH_OSGEARTH)

From that I read in the simulation manual I need to include in my code the makefrag file:

# add required libraries for OpenSceneGraph and osgEarth
ifeq ($(WITH_OSG),yes)
OMNETPP_LIBS += $(OSG_LIBS) -losgDB
endif
ifeq ($(WITH_OSGEARTH),yes)
OMNETPP_LIBS += $(OSGEARTH_LIBS) -losgEarthSymbology -losgEarthAnnotation
endif

I make a new Omnet project with simulations, src, and out folders, and for testing, I add the files from the example to appropriate folders as you can see in the next image.

osg.png
I run the .ini to see if it runs and the project runs properly.
My problem is that in .cc files in the editor they don't find the definitions for osg and osgearth. I try to reindex and I have again the same problem.
Can someone help me? Accept all the sagestions
I don't find anything to solve this.
Finally, I add an image from the example who the editor behaves:
osg_index_working.png


Thanks for your time.

Reply all
Reply to author
Forward
0 new messages