Bringing Visual C++ Toolkit to a Usable State
Microsoft offers its command-line C/C++ compiler for free. Unfortunately, as it ships, it's only useful for "Hello World" type of programs. Fortunately, many of the missing pieces can be found in other free packages distributed by Microsoft. When put together, they happen to be just enough to compile BFilter and its dependencies. Be prepared to download about 200 megs of data though. Let's start then.
- Download and install
Visual C++ Toolkit 2003. From now on I am referring to
C:\Program Files\Microsoft Visual C++ Toolkit 2003(or wherever you have installed it to) as$VCTK. - Download and install
Microsoft Windows Platform SDK.
Don't worry, you won't have to download all those 400 megs. The thing
is named "Windows Server 2003 SP1 Platform SDK", but it works fine on
Windows 2000 and above. Download
PSDK-x86.exe, launch it and select custom install. Just two components are necessary:- Microsoft Windows Core SDK -> Build Environment -> Build Environment (x86 32-bit)
- Microsoft Windows Core SDK -> Tools -> Tools (AMD 64-bit)
nmake.exe,lib.exeandcvtres.exethat happen to work fine on x86 machines. There are actually alternative ways to get those files, but the other component is still necessary. Now copylib.exe,cvtres.exeandmsvcr80.dllfromC:\Program Files\Microsoft Platform SDK\Bin\win64\AMD64to$VCTK\bin. The .dll is necessary because the executables depend on it. We don't copynmake.exebecause it's going to be in the PATH anyway after the next step. - Open
$VCTK\vcvars32.batin Notepad and put the following to the bottom of it:
Set PSDK=C:\Program Files\Microsoft Platform SDK Set PATH=%PATH%;%PSDK%/bin Set INCLUDE=%INCLUDE%;%PSDK%/include Set LIB=%LIB%;%PSDK%/lib
Alternative Ways to Get Missing Pieces
nmake.execan also be found in .NET SDK.cvtres.execan also be found in .NET Runtime or downloaded from here.lib.execan be replaced with alib.batthat looks like this:
link /lib %*
