以下是MAX OS Lion的版本,linux的配置基本上相同。
1,確定已安裝上Mercurial。已安裝後就直接用命令 hg clone http://code.nsnam.org/ns-3-dev 把代碼checkout下來。
2,建立一個空白的c++工程,自己隨便取個名字。在這裏我取的是Datacenter(後面的配置中你自己把相應處改爲你的工程名)。程序的路徑即爲剛纔checkout的ns-3-dev路徑。
3,點擊工程,右鍵properties,首先反勾選使用默認的build命令,填入“${workspace_loc:/Datacenter/waf} ”。然後反勾選“自動生成makefile” 並確保build的路徑是“${workspace_loc:/Datacenter/build}”。
4,behavior部分,build選項後填build,clean選項後填clean。就這樣就可以完成build操作了。
運行操作
run----》external run tools configuration.
Location:${workspace_loc:/Datacenter/waf}
working directory: ${workspace_loc:/Datacenter/build}
Arguments: --run "${string_prompt}"
Debug 操作:
只要build順利的話,debug則非常簡單。直接選擇一個你要debug的應用的程序就可以開始debug了。