Since version 2.1b9, ns has been tested to build and validate under Windows 9x/2000/XP using Cygwin. Cygwin provides a Linux-like environment under Windows. The ns-allinone for the current version (2.35) builds straight out-of-the-box, although a few validation tests may fail.
Important: the primary ns build platform are various flavors of Unix, so build and validation problems on Windows are more frequent. Patches from Windows users to correct any problems are always welcome (Post them to ns-users).
Ns versions up to 2.1b9 work under Windows using Visual C++. However, this method is not actively supported anymore in more recent versions. If you need to use such a version on Windows, you can still find the old instructions on the Windows / Visual C++ page. Since version 2.1b9, ns has used Cygwin/gcc instead of Visual C++. Instructions for running ns 2.1b9, 2.26, and 2.27 under Cygwin are available here. They have been formerly been posted on Nicolas Christin's web page.
setup.exeprogram, you'll have to consider some points:
mount | grep textmodeand if you don't get anything (i.e., it returns an empty string), you should be fine. If the above command does return something, you are quite likely using the DOS text type, and you may be in trouble.
C:\Cygwin(the default) is a good installation directory,
C:\Program Files\Cygwinis not.
XFree86-etc) or X.org (packages
w32api. Any missing packages can be added with Cygwin's
Building ns from pieces requires some tweaking of the included components, which has already been done for the allinone package. These instructions only cover ns-allinone.
After you've setup Cygwin, get
and unpack it to a directory reachable from Cygwin. Start the Cygwin Shell (
cd into your ns directory and issue
at the command prompt. The installer will check if all prerequisites are met, and if so,
will build the whole package.
The installation is similar to Unix install, so at the end of the build process you're advised to set some environment variables. This step is required for ns to work. You might want to add these variables to your
~/.bashrc, so you don't have to retype them every time.
Finally, you might want to check your installation with
ns-allinone-2.28-cygwin-binaries.zipunder your Cygwin root directory (C:/cygwin). It will place all binary files under
/usr/binand libraries under
export TCL_LIBRARY=/usr/lib/tcl8.4/at the Cygwin (bash) shell prompt.
startxat the prompt) first and then run
nam.exefrom one of the X terminals.
Note:You'll likely encounter the following message:
When configured, ns found the right version of tclsh in /home/dukat/ns-allinone-2.28/tcl8.4.5/unix/tclsh but it doesn't seem to be there anymore, so ns will fall back on running the first tclsh in your path. The wrong version of tclsh may break the test suites. Reconfigure and rebuild ns if this is a problem.This is a cosmetical annoyance and doesn't hinder proper operation. To get rid of this message you'll have to compile ns from source.