Building Inferno With MSVC

Notes

These instructions apply to the older version of MS VC++ EE (the 2005 version, specifically) and to an older version of Inferno. They are included for historical interest and just in case anyone still uses that combination. That verion of VC++ is no longer available, and the 2008 version works out of the box with the current Inferno distributions. So in most cases, you will no need to go throught the contortions described here.

In all cases your best bet is to use the "Command Prompt" that is installed with Visual Studio. It sets up all the correct environment variables so that the compiler can find the header files and libraries. It is possible to find them and set it up yourself, but it's not worth the effort as it's easy to miss something and they tend to move between versions of the compiler.


These instructions detail how to build Inferno using Microsoft's Visual C++ 2005 Express Edition. This version is freely available from Microsoft's web site. I assume here that you have already installed Inferno in its default location of C:\Inferno.

The instructions here are the results of my experiments a year ago.

Installing Development Tools

  1. Install Visual C++ 2005 Express Edition
    It can be found here
  2. Install Windows Server 2003 Platform SDK
    The Web install can be started here. Only a small fraction of the overall SDK is needed for building Inferno. I have verified that it will build with these, though even some of these may not be necessary. Everything else can be omitted.
    1. Microsoft Windows Core SDK without 64-bit tools, 64-bit build environment, documentation, and sample code
    2. Microsoft Windows Installer SDK without 64-bit build environment, documentation, and sample code
  3. When compiling use the Command Prompt installed with the Visual Studio suite. There's generally an entry for it in the Start menu hierarchy for Visual Studio. That script will set up all the environment variables you will need.

Inferno Configuration

Make these changes to Inferno files. By clicking on the file name, you can download the file with the necessary modifications.
  1. In /mkconfig:
    1. ROOT=C:/Inferno
    2. SYSHOST=Nt
    3. OBJTYPE=386
    4. #OBJTYPE=$objtype
  2. In /mkfiles/mkfile-Nt-386:
    1. LDFLAGS= $LDEBUG -nologo -incremental:no -map -force:multiple
  3. In /emu/Nt/emu:
    1. # eia
  4. In /emu/Nt/mkfile:
    1. CONFLIST=emu
  5. In /emu/Nt/os.c, comment out the function time().