Well, I can't be sure because I never used Windows. I can tell that on Linux it's very easy. Like... 6 commands if you don't need the python interface. If you need that as well it depends, but it's easy as well.
Just as an example:
- Get Ubuntu 22.04.
- sudo apt update
- sudo apt upgrade <- technically unnecessary, but it's always a good thing to do
- sudo apt install -y g++ cmake ninja-build ccache python3 python3-dev gsl-bin libgsl-dev libgsl27 libboost-all-dev libgtk-3-dev libfl-dev libxml2 libxml2-dev libopenmpi-dev openmpi-bin openmpi-common openmpi-doc libsqlite3-dev sqlite3 libeigen3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools ssh git
- cd ns-3-dev
- ./ns3 configure --enable-examples --enable-tests
- ./ns3 build
Easy, isn't it ?
Note that the above list of packages is an overshoot, as it will install some stuff you'll probably not need, like gtk, openmpi and qt (these are optional and needed only by some specialized modules).
Also... note for whoever will read this post in the future:
The above commands are valid today (April 8, 2023). Future ns-3 releases might need more or less packages, and the commands might change over time. Do NOT blindly copy-paste and then complain that it's not working.
Do NOT stick to ns-3.38 and Ubuntu 22.04 just because the above command list works for 3.38 and Ubuntu 22.04. Read the documentation.