这是工程仿真的第一步,参考的网址来源于http://pharos.ece.utexas.edu/wiki/index.php/How_to_Install_OMNeT%2B%2B_4.2.2_on_Ubuntu_12.04
以下是原文:This tutorial provides step-by-step instructions on how to install OMNeT++ 4.2.2 on Ubuntu 12.04. It assumes you have a clean installation of the OS.
Contents [hide]
1 Step 1: Install the Prerequisite Packages
2 Step 2: Download the OMNeT++ Source Code
3 Step 3: Compile OMNeT++
4 Step 4: Testing the Installation
5 Step 5: Install the INET Framework
Step 1: Install the Prerequisite Packages
First ensure that the "universe" repository is enabled (see: https://help.ubuntu.com/community/Repositories/Ubuntu).
Then execute the following command to install the prerequisite packages:
$ sudo apt-get install build-essential gcc g++ bison flex perl \
tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre \
doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev
这是安装Omnet++运行环境相关的底层库,可能会有安装报错的时候,那就单独安装吧
Step 2: Download the OMNeT++ Source Code
You can download the tarball here: http://www.omnetpp.org/omnetpp/doc_details/2245-omnet-422-source--ide-tgz
After downloading it, extract it by executing:
$ tar zxvf omnetpp-4.2.2-src.tgz
解压下载的Omnet++压缩包
Step 3: Compile OMNeT++
First setup the environment variables:
$ cd omnetpp-4.2.2
$ . setenv
进入配置模式
Then run configure:
$ ./configure
这里系统会让你添加系统变量,我的方法是 sudo gedit .bashrc 复制configure结尾里提示你要添加的两个变量到该文件的末尾,然后保存---注销---重启终端
Finally, compile the simulator:
$ make
在Ubuntu上安装必须的两部
After it's done compiling, you should see the following:

Step 4: Testing the Installation
$ cd samples/dyna
$ ./dyna
进入示例,看看到底什么是Omnet++
After clicking through some options, you should see something like:
Exit the demo, then start the OMNeT++ 4 IDE:
$ omnetpp
真正的启动OMnet++
You should see the IDE:
Go through the TicToc tutorial.
Step 5: Install the INET Framework
安装INET分需要了,LZ表示我就没有安装