Basic Guide to OMNeT++ : Installation, Configuration and Building

OMNeT++ - The Open Simulator
OMNeT++ – The Open Simulator, official page at http://omnetpp.org

OMNeT++ is a discrete event based network simulation framework which provides modularity in open architecture for simulation of computer and related communication networks. OMNeT++ Modeling and Simulation is being used by many researchers and academicians in recent years. We present here basic step by step guide to use OMNeT++, its installation, configuration and building along with screenshots. The basic guideline is published at http://omnetpp.org/doc/omnetpp41/InstallGuide.pdf.

I am using OMNeT++ for my thesis in Sensor Network, visit the category Sensor Network to read more about this.
Requirements of OMNeT++ Simulator:
The supported OS are Windows XP (32x) and later versions, MAC (32x), Linux (64x) are supported. I still can’t configure OMNeT++ in 64 bit version of Windows 7. Install latest version of Java from java.com prior to OMNeT++, this shall be good when you work in Eclipse-based Simulation IDE for OMNeT++. (To confirm if your computer has already installed Java, click here)
How to install OMNeT++ ?

  1. Installation of OMNeT++ is rather easy. Download the source code from the official website at http://omnetpp.org for your OS, here I downloaded for 32x version of Windows 7. (I suggest you to download zipped file)
  2. Copy that just downloaded zip file to the directory where you want to install and work in OMNeT++. Ensure that you don’t have any spaces for the folders (better to have single word folder name like OMNeT, avoid folder names like Program Files)
  3. Extract the file. For the 4.1 version of OMNeT++, you shall have a new omnetpp-4.1 directory just created after extraction of the archive, inside which you can see many files and folders. (I have 24 files/folders inside the directory D:\OMNeT\omnetpp-4.1 )
  4. It is a better idea to read the pdf guide inside the location: OMNeT\omnetpp-4.1\doc\InstallGuide.(however this is the same online documentation files which you read on the first paragraph of this article)

 How to configure & build OMNeT++?
As you must have already known that what we downloaded and installed in earlier steps was all for the source code of OMNeT++. To have an executing program, we need to configure and build OMNeT++ Simulator out of that source codes.

  1. Open file mingwenvlocated inside the omnetpp-4.1 folder. You shall be prompted with a welcome screen as shows below.
    Welcome Screen OMNeT++
    Welcome Screen OMNeT++
  2. Time to build the “thing” we need, enter the following commands serially, which shall build release binaries.
    $ ./confgure
    $ make
    Take a cup of coffee, this might take a couple of minutes to complete. This also installs the sample files and debug the same. Take a look at the screenshot, ensure your installation path of OMNeT++ is okay.
  3. Verify the installation to test if all sample files are installed correctly, use the following commands for that.
    $ cd samples/dyna
    $ ./dyn
    All the sample files will be run, you will see the graphical Tkenv GUI environment, as illustrated here.
  4. Set up an Inifile Configuration (we select “8-client computers”) when prompted in the OMNeT++/Tkenv window.
  5. You can safely exit from windows interfaces when you are done playing with it.

How to Start/Open/Run OMNeT++ IDE?
We have already installed Java in early steps of this article. OMNeT++ comes with an Eclipse-based Simulation IDE. Open the file mingwenv if you have closed it, then to start the IDE type
$ omnetpp
OR
Open omnetpp executable file directly from omnetpp-4.1/ide folder. I suggest you to have a shortcut link to start IDE or you can pin it to the taskbar in Windows 7. In my case, the complete path to omnetpp IDE is D:\OMNeT\omnetpp-4.1\ide\omnetpp.exe.
Select the folder for sample files when prompted. You can see the Eclipse-based Simulating Integrated Development Environment for OMNeT++ as illustrated here. Now, time to play around various icons and others.

About The Author

3 thoughts on “Basic Guide to OMNeT++ : Installation, Configuration and Building”

  1. Tutorial was good, however my installation did not work as above. When I type ./configure I get the following:
    $ ./configure
    checking build system type… i686-pc-mingw32
    checking host system type… i686-pc-mingw32
    configure: ———————————————–
    configure: reading configure.user for your custom settings
    configure: ———————————————–
    checking for icc… no
    checking for gcc… gcc
    checking for C compiler default output file name… a.exe
    checking whether the C compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables… .exe
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking for icpc… no
    checking for g++… g++
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking for g++… g++
    checking for ranlib… ranlib
    checking whether g++ supports -fno-stack-protector… yes
    checking whether g++ supports -Wl,–no-as-needed… yes
    checking whether g++ supports -Wl,–as-needed… yes
    checking for swapcontext… no
    checking if shared libs need -fPIC… no
    checking for dlopen with CFLAGS=”” LIBS=””… no
    checking if –export-dynamic linker option is supported/needed… test
    failed
    checking for flags needed to link with static libs containing simple
    modules…
    –whole-archive
    configure: NOTE: Use the following syntax when linking with static
    libraries
    configure: containing simple modules and other dynamically registered
    components
    :
    configure: g++ … -Wl,–whole-archive -Wl,–no-whole-
    archive …
    checking whether linker supports -rpath… yes
    checking for bison… bison -y
    checking for flex… flex
    checking lex output file root… lex.yy
    checking lex library… none needed
    checking whether yytext is a pointer… no
    checking for make… make
    checking for perl… perl
    checking for swig… not found
    checking for math with CFLAGS=”” LIBS=””… yes
    checking for standard C++ lib with CFLAGS=”” LIBS=”-lstdc++”… no
    checking for standard C++ lib with CFLAGS=”” LIBS=”-lcxx”… no
    checking for standard C++ lib with CFLAGS=”” LIBS=”-lcxa”… no
    configure: error: Standard C++ library -lstdc++_s or -lstdc++ or -lcxx
    or -lcxa not found
    Can you please let me know what I might be doing wrong?
    Many Thanks

  2. Pingback: Choosing the best Simulation or Emulation Software tool for Research

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top