This guide documents the different ways that users can download, build, and install |ns3| from source code. All of these actions (download, build, install) have variations
or options, and can be customized or extended by users; this document attempts to inform readers
about different possibilities.
Please note a few important details:
* |ns3| is supported for Linux, macOS, and Windows systems. Linux is the primary system
supported, and (almost) all |ns3| features are supported on Linux. However, most features can
also be used on macOS and Windows. Windows is probably the least used and least supported
system.
* |ns3| has minimal prerequisites for its most basic installation; namely, a **C++** compiler,
**Python3** support, the **CMake** build system, and at least one of **make**, **ninja**, or
**Xcode** build systems. However, some users will want to install optional packages
to make use of the many optional extensions.
* |ns3| installation requirements vary from release to release, and also as underlying operating
systems evolve. This document is version controlled, so if you are using the *ns-3.X* release,
try to read the *ns-3.X* version of this document. Even with this guidance, you may encounter
issues if you are trying to use an old version of |ns3| on a much newer system. For instance,
|ns3| versions until around 2020 relied on Python2, which is now end-of-life and not installed
by default on many Linux distributions. Compilers also become more pedantic and issue more
warnings as they evolve. Solutions to some of these forward compatibility problems exist and
are discussed herein or might be found in the ns-3-users mailing list archives.
If you find any stale or inaccurate information in this document, please report it to maintainers,
on our `Zulip chat <https://ns-3.zulipchat.com>`_, in the GitLab.com
`Issue tracker <https://gitlab.com/nsnam/ns-3-dev/-/issues/>`_, (or better yet, a patch to fix
in the `Merge Request tracker <https://gitlab.com/nsnam/ns-3-dev/-/merge_requests>`_), or on our
developers mailing list.
We also will accept patches to this document to provide installation guidance for the
FreeBSD operating system and other operating systems being used in practice.
Software organization
*********************
|ns3| is a set of C++ libraries (usually compiled as shared libraries) that can be used by C++
or Python programs to construct simulation scenarios and execute simulations. Users can also
write programs that link other C++ shared libraries (or import other Python modules). Users can
choose to use a subset of the available libraries; only the ``core`` library is strictly required.
|ns3| uses the CMake build system (until release 3.36, the Waf build system was used). It can be
built from command-line or via a code editor program.