Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: [Original edit by SidneyMarkowitz]

How to get a no-cost Windows build environment for spamc

...

Once you install perl and the required perl modules, you can install SpamAssassin from the source files (see InstallingOnWindows). When you perform the step of perl Makefile.PL, you are asked if you want to build spamc. You must answer "no" if you do not have the proper tools to build the spamc executable. Here is how you can get the tools from Microsoft at no cost. Before you do this, you should notice how much easier it is to just get a copy of spamc.exe from someone who has already built it.

  1. Download and install Microsoft Visual C++ Toolkit 2003 from

http://msdn.microsoft.com/visualc/vctoolkit2003/

...

You do not need to select the install option that registers path information in the environment.

2. Download and install the Core Platform SDK from

...

Edit the file VCVARS32.BAT that is in the Microsoft Visual C++ Toolkit 2003 directory to add the include and lib directories of the SDK that you just installed to the INCLUDE and LIB environment variables.

3. Download nmake.exe

  • You can get an old version of nmake in the self-extracting archive file

...

Run it to create the files nmake.exe and nmake.err, which should both be placed in a directory that is in the Path, such as \perl\bin or the bin directory of the Visual C++ Toolkit. This version of nmake cannot handle long pathnames. If you installed the toolkit and SDK in short named directories, then that will be fine. An alternative is to use the short pathname equivalents when setting the INCLUDE and LIB environment variables.

  • A newer version of nmake.exe that can handle long pathnames is part of the .NET Framework 1.1 Software Development Kit. Getting it requires first installing the .NET 1.1 runtime, and then using Internet Explorer and accepting installation of an ActiveX control at http://msdn.microsoft.com/netframework/downloads/updates/. Once you install the .NET Framework 1.1 Software Development Kit, copy the nmake.exe file that comes with it to a directory that is on your path, such as \perl\bin or the bin directory of the Visual C++ Toolkit.

That is hundreds of megabytes of download just to get nmake.exe if you don't want the .NET runtime and SDK for other reasons.

4. Using the build environment

When you want to build SpamAssassin with spamc, use the shortcut named "Visual C++ Toolkit 2003 Command Prompt" that in the the directory in which you installed the toolkit. Doubleclicking on it will open a command prompt window with the proper build environment in which you can install SpamAsssassin SpamAssassin and accept the option to build spamc.