at the Bash prompt.cl -DSTANDALONE -D_X86_ lzexpand.c lz32.lib
Microsoft's C++ Toolkit is currently offered for free-as-in-beer download at msdn.microsoft.com/visualc/vctoolkit2003/. I installed my copy to C:\Program Files\msvc2003.
You'll also need the Microsoft Platform SDK. This is installed using an Active X program which only runs under IE5 or later, so in an IE 5 or later browser, go to www.microsoft.com/msdownload/platformsdk/sdkupdate/ and follow instructions. You can go to that page with other browsers, and download the MS Platform SDK, but that won't do you any good; you will still need IE5 or later to run the Active X component locally. I installed my copy to C:\Program Files\MicrosoftSDK.
then transferring ms.tar.gz to Linux, and unpacking it with commands like:$ cd /cygdrive/c $ tar -czf ms.tar.gz "Program Files/msvc2003" "Program Files/MicrosoftSDK"
$ cd ~/.wine/c $ tar -xzvf ~/ms.tar.gz
For instance, assuming you have H: set up in Wine to access your home directory, ~/bin/cl should look like this:
And the batch file it runs iswine wcmd /c H:/bin/cl.bat "$@"
vcvars32.bat is essentially the one installed by Microsoft, but without quotes:call H:\bin\vcvars32.bat cl %1 %2 %3 %4 %5 %6 %7 %8 %9
You can download my set of scripts as a tarball:@echo off Set PATH=C:\Program Files\msvc2003\bin;%PATH% Set INCLUDE=C:\Program Files\msvc2003\include;C:\Program Files\MicrosoftSDK\include;%INCLUDE% Set LIB=C:\Program Files\msvc2003\lib;C:\Program Files\MicrosoftSDK\Lib;%LIB%
at the bash command prompt, and run the resulting program withcl -D_X86_ hello.c
If vcvars32.bat has quotes, cl will fail like this:
This is a bug in wine's wcmd, and it's been there for a long time. wcmd probably just doesn't support quotes properly.H:\>call H:\bin\vcvars32.bat PATH="C:\Program Files\msvc2003\bin;c:\windows;c:\windows\system" File not found