How to configure eclipse with ns3

145 views
Skip to first unread message

Naveena Mangal

unread,
Feb 9, 2024, 5:24:35 AM2/9/24
to ns-3-users
Hi,
I installed eclipse IDE and ns3.36 today. Please help me configure eclipse with ns-3. 
I found very old videos and websites which are of no use today I guess. 
Also, I am not able to find ns-3-dev file. 
Can anyone help please?

--
Naveena

Tommaso Pecorella

unread,
Feb 9, 2024, 9:02:07 AM2/9/24
to ns-3-users
https://www.nsnam.org/docs/installation/html/index.html

As for Eclipse, I can't help. I happily did put it in the bin and erased it. Suggested alternative: VSCode, https://vscodium.com, or CLion.

Gabriel Ferreira

unread,
Feb 10, 2024, 2:21:12 PM2/10/24
to ns-3-users
ns-3.36 uses CMake, so you can follow these. 
https://gabrielcarvfer.github.io/NS3/installation/eclipse

Only upstreamed VsCode and CLion documentation because they natively support CMake projects, and XCode due to requests.

Wasif Sardar

unread,
Feb 12, 2024, 1:18:59 AM2/12/24
to ns-3-...@googlegroups.com

If there is no specific reason for using eclipse IDE then I would suggest VSCode as it has CMake support and powerful debugger.

For installation and debugging,  see the installation guide attached herewith.


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/9f12aedc-cc1d-4fed-92ec-76576cc2016fn%40googlegroups.com.
Installing VScode and Debugger.pdf

Naveena Mangal

unread,
Feb 12, 2024, 4:10:15 AM2/12/24
to ns-3-users
Thank you all. 
I will follow these suggestions. For other doubts I will come back for sure :) 
Message has been deleted

Naveena Mangal

unread,
Feb 12, 2024, 7:34:46 AM2/12/24
to ns-3-users
Hi Wasif,
I followed the installation guide and tried debugging. However, I get the error "ns3.36.1-first-debug doesn't exist".\
Please guide me.
I have attached the screenshot of launch.json
Screenshot from 2024-02-12 13-25-29.png

Tommaso Pecorella

unread,
Feb 12, 2024, 9:05:49 AM2/12/24
to ns-3-users
Wassif's instructions are good for a recent-enough ns-3 release (3.36.1 doesn't classify as "recent"). Plus, the answer is in your computer.

I'm assuming that you did compile ns-3 successfully (if not, well, that's the reason for any error).

Now, go to the directory "build/scratch" (or any other subdirectory of "build" containing an executable) and look at the file names.
You'll probably find that the executables have a different pattern than the one in launch.json, like ending in "-default" instead of "-debug". That name part is dependent on the build type.
Now you should be able to figure out what to do.

If you had a more recent ns-3, this would have been taken care of by the updates scripts. But you don't.

Naveena Mangal

unread,
Feb 12, 2024, 10:52:38 AM2/12/24
to ns-3-users
Thank you for the suggestion. It works now :)

Dimes

unread,
Oct 1, 2024, 3:45:17 AM10/1/24
to ns-3-users
check you build-profile with $ ./ns3 configure, and to see if the build-profile is set to debug
 2.png 

If the build profile is set to, lets say, "default", then the file name would not end with "debug", thus your launch.json file don't recgnize it. 
1.png
To set to debug, run $ ./ns3 configure --build-profile=debug

Reply all
Reply to author
Forward
0 new messages