SML/NJ Manual Installation for Windows 95 and NT

These instructions are provided for those that need to recompile the runtime system, the SML/NJ compiler, or the other tools provided with the SML/NJ distribution.

Required tools

You will need to install the SML/NJ executables from the self-installing executable provided in the distribution. This is necessary to install some of the required batch files to invoke the compiler.

To unpack the distribution, you will need the Windows versions of the "GNU unzip" (gunzip) and "tape archive" (tar). These are freely available from

Compiling the runtime system requires the following tools:

It should be straightforward to build with other compilers, assemblers, and "make" utilities (see src\runtime\objs\makefile.win32 and src\runtime\objs\mk.x86-win32).

Compiling the SML compiler source requires ksh and common Unix tools (sed, grep). We use MKS Toolkit for this, although other ksh based toolkits should work directly as well; e.g. UWIN.

Installing the source files

  1. Determine the root directory for the SML/NJ installation on your system, and make it your current directory. For the purpose of exposition, we will assume the default directory, C:\SML.
  2. Download the runtime system sources and the SML/NJ compiler sources:
    You may also wish to fetch some of the following optional components of the SML/NJ distribution:
    110-cm.tar.ZCompilation Manager
    110-smlnj-lib.tar.ZStandard ML of New Jersey Library
    110-ml-burg.tar.ZML-Burg code-generator generator
    110-ml-lex.tar.ZML-Lex lexical analyzer generator
    110-ml-yacc.tar.ZML-Yacc parser generator
  3. Uncompress and unbundle each of the distribution files:
    C:\SML\> gunzip 110-runtime.tar.Z
    C:\SML\> tar -xvf 110-runtime.tar
  4. Change to the SRC\SML-NJ directory
    C:\SML\> ch src\sml-nj
  5. Download the SML/NJ compiler binaries:
  6. Uncompress and unbundle the binaries:
    C:\SML\SRC\SML-NJ\> gunzip 110-bin.x86-win32.tar.Z
    C:\SML\SRC\SML-NJ\> tar -xvf 110-bin.x86-win32.tar

Compiling the runtime system

  1. Ensure that the compiler, assembler, and "make" utility are in your path.
  2. Compile the runtime by issuing
        nmake /f mk.x86-win32
    in SML/NJ's src\runtime\objs directory. This will create run.x86-win32.exe which is usually placed in the smlnj\bin\.run directory.

Compiling the SML/NJ compiler

Set the working directory to src\sml-nj and, from a ksh prompt, issue the command:
    xmakeml -boot bin.x86-win32
This will produce the image sml.x86-win32 which is usually placed in bin\.heap

Compiling the various tools

SML/NJ tools are built analogously to the Unix versions. That is, the command
is issued in the respective tool directory. Note that SML/NJ's bin directory must be in the path for the default build command to find the compiler and tools.

| SML/NJ Home Page |

Send your comments to
Copyright © 1998, Lucent Technologies; Bell Laboratories.