sgk
sgk

Reputation: 19

To run Omnet++ from command prompt, how to solve liboppcmdenvd.dll is missing error?

I want to run that Omnet++ project using command prompt. I am trying to execute the .exe file using the cmd prompt it is showing me the system error- "The program can't start because liboppcmdenvd.dll is missing from your computer. Try reinstalling the program to fix this problem". I reinstalled the program but still it is showing the same error. So can anyone please tell me what is that .dll file and how I resolve this error? And also is there any way run Omnet++ from command prompt and write result to a file without opening the graphical simulation interface? Thank you.

Upvotes: 0

Views: 2732

Answers (1)

Jerzy D.
Jerzy D.

Reputation: 7002

It is possible to run OMNeT++ simulation without Eclipse in Windows. Setting paths to OMNeT++ libraries as well as to MinGw binaries is most important. I assume that:

  • you use OMNeT++ 4.6
  • OMNeT++ is installed in e:\omnetpp\omnetpp-4.6
  • your model is called wireless1 and is located in e:\omnetpp\omnetpp-4.6\samples\wireless1
  • your model depends on MiXiM 2.3
  • Mixim-2.3 is located in e:\omnetpp\samples\MiXiM and it is built

1.Append the following path to the Windows system PATH variable: e:\omnetpp\omnetpp-4.6\bin;e:\omnetpp\omnetpp-4.6\tools\win32\mingw32\bin;e:\omnetpp\samples\MiXiM\src

2.The list of directories with NED files in MiXiM has to be prepared. Do the following:

  • open mingwenv.cmd
  • in the mingw console type
    cd /e/omnetpp/omnetpp-4.6/samples/wireless1
    then
    find ../MiXiM/ -name "*.ned" -printf '%h\n'| sort -u > list1.txt
    then
    tr '\n' ';' < list1.txt > list2.txt

3.In the e:\omnetpp\omnetpp-4.6\samples\wireless1 directory create a new text file with the following content:

@echo off
wireless1.exe -u Tkenv -l mixim -n [CONTENT OF LIST2.TXT]  ..\simulations\omnetpp.ini

where after -n you have to paste the whole content of list2.txt (without the last ; and without [,]).
Then save this file as standalone.bat and just double-click on it to start simulation. Results of the simulation will be written to *.sca and *.vec files in simulations\results. In order to run without GUI change -u Tkenv into -u Cmdenv.

Upvotes: 1

Related Questions