Policy-based Resilience Simulator with OMNeT++/Building OMNeT++

Note: Please take a look at official install guide before proceeding. Keep it open in a tab, because there will be references to that guide during the build process. You can get the latest OMNeT++ from here. If you are trying to set-up a Policy-based Resilience Simulator, you will have to use OMNeT++ 4.1, which can be downloaded from here.

Note: Now on,  folder in your home will be referred as "omnetpp folder" from now on.

Building OMNeT++
Unpack the .tar.gz file you just downloaded

To build OMNeT++ 4.1/4.2/4.2.2, you need to make the following edit:

For OMNeT++ 4.1 and 4.2(.2), soon after unpacking OMNeT++ .tar.gz package, open file  located in   in your omnetpp folder and add following line in the beginning of the file:

In case you already ran configure script and got the error, delete the omnetpp folder in your home, unpack it again, make the change.

Now, install the required dependencies (distro specific) mentioned in the install guide. Then open terminal and run

Note: Here, replace " " with version you are trying to build. Towards the end, the configure script will show some warning similar to:

To do this, open the  file (located in Home folder, it'll be hidden-click   or   to see it) with your favorite text editor, copy paste those lines to the end of the file. The added lines will look like this: After this, close, and re-open terminal OR run Navigate back to omnetpp directory, and run again. Now we are all set to compile OMNeT++. Run It'll take some 10-20 minutes to compile, once it is done you can start OMNeT++ by typing: Your simulator IDE should now start.

Testing your build
OMNeT++ IDE, in first run you might be asked to "Select a Workspace", just go with the default one already over there. First you will be welcomed with a Welcome tab, you can close/ minimize it to get the full IDE.

You can test if your install is successful by running an example. Right click any of the examples there, say dyna, click "Open Project", now click the down arrow next to the green play button in toolbar, click Run As > OMNeT++ Simulation.

Now few windows should pop up, where the simulation runs if you click on the "Run" button in the tkenv window that pops up.

Troubleshooting
On running example, if nothing happens and instead OMNeT++ gives an error like in Console tab, this bug will be of some help. This error was noticed in OMNeT++ 4.1 in both Xubuntu (13.04, 12.10) and Linux Mint 14.

Make sure you close the IDE before recompiling it after installing necessary dependencies. If that doesn't solve your issue, or in case of any other difficulties, you can try asking for help in the OMNeT++ Mailing List.

If you are a new to OMNeT++, follow this link to get a general idea on how to play with OMNeT++. You can learn few Tips and Tricks here.

You can now proceed to compiling INET.