How to Build Racket on Windows 7
Fri 5 Apr 2013 16:54 EDT
Here are the steps I followed to build Racket from a git checkout on a fresh Windows 7 installation.
-
Installed Visual Studio Express 2008 (not 2010 or 2012). This is hard to find on Microsoft’s website; this stackoverflow question linked to the Visual Studio Express 2008 ISO directly.
-
Used Virtual Clone Drive from SlySoft to mount the ISO in order to install Visual Studio, since Microsoft thoughtfully omitted ISO-mounting functionality from the core operating system.
-
Installed MASM32 to get a working assembler, since Microsoft thoughtfully omitted an assembler from their core compiler suite. (I am informed that later and/or non-Express editions of Visual Studio do actually include an assembler.)
-
Added the following directories to the system path:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
, forcl.exe
etc.C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE
, forVCExpress.exe
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
, forvsvars32.bat
C:\masm32\bin
, forml.exe
They do have to appear in that order, in particular with the MASM directory last, since it includes a
link.exe
that will otherwise conflict with the Visual Studio linker. -
Installed Github for Windows and checked out Racket.
-
Opened a
cmd.exe
shell. NOTE not a PowerShell instance. Somehow environment variables are propagated differently in PowerShell from incmd.exe
! You want to only try to usecmd.exe
to build Racket with. -
Ran
vsvars32.bat
in that shell. This step is important, as otherwise the start of the xform stage in the build will fail to findstdio.h
. -
Navigated to my Racket checkout within that shell, and from there to
src/worksp
. Ranbuild.bat
.
Following these steps will in principle lead to a fresh Racket.exe
living in the root directory of your Racket checkout. There are many,
many things that could go wrong however. Good luck!
Comments (closed)
How to build it with Visual Studio Express 2010?
Many thanks in advance,
Cesar