昨天被小杨同学叫去装软件,本以为很easy的东西,没想到从下午4点弄到晚上近7点,还没弄好!主要是长时间待在Ubuntu下人变得越来越懒,configure后一堆warning & erro都没心思看!不甘心,今天下午自己实验,仔仔细细的看了一遍config.log把错误一条条的找出来解决,经过两个小时的奋斗终于搞定!
1、首先要下载OMNeT++ 貌似现在最新的是3.4b2.将压缩包解压到用户目录下:
tar -C ~/ -xvzf omnetpp-3.4b2-src.tgz
2、然后就是下载所依赖的包,好在这些包源里都有,直接apt得到:
sudo aptitude install bison byacc flex graphviz imagemagick tk8.4-dev doxygen giftrans blt-dev libxml2-dev blt-demo doxygen-doc doxygen-gui html2ps tcl8.4-doc tk8.4-doc bison-doc
3、设置环境变量:
vim ~/.bashrc
添加如下内容:
export PATH=$PATH:~/omnetpp-3.4b2/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/omnetpp-3.4b2/lib export TCL_LIBRARY=/usr/lib/tcl8.4
保存后最好logout一次,偶一开始就是没有logout,结果在configure的时候报错,导致make不了!最好还是logout一下吧!
4、进入omnetpp-3.4b2目录下config & make
./configure
根据输出来判断是否正确,如果缺少某些包的话会提示(Akaroa,、MPI除外) 直到没有出现erro,并且看见三个Good后说明成功!然后就是make了!
5、一般config没错误的话make也应该没问题的,make通过后就可以运行了!
cd ~/omnetpp-3.4b2/samples/dyna ./dyna
Q:What is OMNeT++?
A:“The fact that OMNeT++ is highly modular and well structured is a big advantage when it comes to implementing new protocols to be used in the simulator. The process of implementing MQTT for OMNeT++ was quite straightforward and convenient especially thanks to the NED language.” Master’s Thesis of Julio Perez, September 2005, IBM Zurich Research Laboratory, Switzerland. Section 4.1, pp25.