NS3 in Eclipse
I found this wiki page on configuring NS3 with Eclipse and decided to give it a try. I had trouble compiling, and Eclipse kept giving the following error:
After spending a little time with the configuration, the following additional tweaking seems to be working (in Ubuntu 10.04, Eclipse version 3.5.2 Galileo with ns-allinone-3.8):
-
Create a new External tool configuration. The location should be the location to waf (
${workspace_loc:/ns3/waf}
in my case) and working directory should be the directory where waf is present (${workspace_loc:/ns3/}
in my case). In arguments textbox, provide the following:--run "${string_prompt}"
. Now when you try to build the project (right click on theproject -> Build Project
), it should work. -
To run NS3 programs using waf, you need to create a new Run configuration. Make the new configuration to be a C/C++ application. Select the project you want this run configuration to be associated with, and give the complete path to waf as the C/C++ program. Click on the arguments tab, and provide the same argument as above. Now when you try to run a program, a dialog box should pop-up asking for the input arguments to waf and your program should run.