Network Simulator - ns-3: Difference between revisions
imported>EyJhb ns-3 is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. This shows how to do development using ns-3 |
imported>Mic92 syntax highlighting; revisit nix shell |
||
| Line 11: | Line 11: | ||
mkShell { | mkShell { | ||
nativeBuildInputs = [ | |||
llvmPackages_latest.clang | |||
pkg-config | pkg-config | ||
]; | ]; | ||
buildInputs = [ ns-3 ]; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 21: | Line 21: | ||
Then we can create our <code>Makefile</code>, do note the LIBS argument, which is the modules required (not all are build by default, might have to override some settings in ns-3). | Then we can create our <code>Makefile</code>, do note the LIBS argument, which is the modules required (not all are build by default, might have to override some settings in ns-3). | ||
<syntaxhighlight> | <syntaxhighlight lang=Make> | ||
# the compiler: gcc for C program, define as g++ for C++ | # the compiler: gcc for C program, define as g++ for C++ | ||
CC = clang++ | CC = clang++ | ||