0
votes

this is my first time posting on stackoverflow, it's great to finally participate in the community.

I am trying to install INET for Omnet++, and I am getting the following error, " Error: Could not load NED sources from '.': Declared package 'inet...' does not match expected package '' in file ...ned".

My omnetpp samples work, so I know it's not an omnetpp problem, although I got an error when I tried to install inet through "Help > Install Simulation Models", so I just cloned the git repo. I currently have my inet folder from within samples.

I get this error when I run it with opp_run, in addition to when I try to run it on the IDE.

Does anyone know how to link omnetpp with inet? I would prefer if it were on command line, but I would not mind if it were on the IDE either.

1

1 Answers

0
votes

This is NOT a linker issue. As you can start the actual executable, linking was successful. The error is about the NED files loaded are not correctly loaded and reason is that you should specify the root folder of the NED hierarchy and you should specify that as a command line parameter.In INET, you must specify that src and the examples folder is a 'NED folder'. Use the -n command line option for that.

NOTE1: As a side note, INET already contains a bash script (src/run_inet) which does that for you, so generally , you should run INET simulation by invoking that script.

NOTE2: If you are using INET 4.x then there is a 'setenv' script in the INET root folder that you MUST source before trying to run the examples (or build INET). That one sets up the required environment variables for optimal operation. i.e. Before doing anything you must source the setenv script (both the one which is in the omnetpp root and the one which is in the inet root)

$ . setenv