Difference between revisions of "Installing Microsoft C compiler (Visual Studio 2010 and older, or Windows SDK 7.1 and older)"

(Windows SDK)
m (Using espawn Instead)
Line 19: Line 19:
 
Alternatively you can compile the utilize the [http://www.eiffelroom.com/tool/espawn espawn] tool. The tool mocks the environment used by the Eiffel compiler so global access to Windows SDK tools, such as the C/C++ compiler, is granted. As such there is no need to manually configure your system's environment variables or use the setenv.cmd.
 
Alternatively you can compile the utilize the [http://www.eiffelroom.com/tool/espawn espawn] tool. The tool mocks the environment used by the Eiffel compiler so global access to Windows SDK tools, such as the C/C++ compiler, is granted. As such there is no need to manually configure your system's environment variables or use the setenv.cmd.
  
{{Note| espawn is not distributed with EiffelStudio so you will need a working Eiffel compiler to compile and make use of it.}}
+
{{Note| espawn is not distributed with EiffelStudio so you will need a working Eiffel compiler to compile and make use of it, or you may visit [http://www.eiffelroom.com/tool/espawn eiffelroom] and download the tool.}}

Revision as of 08:03, 26 April 2007

The Microsoft C compiler is now freely available by downloading the Windows SDK. Below you will find a description on how to set up the Microsoft SDK so that you can compile C code on Windows.

Windows SDK

The first thing to do is to download the Windows SDK from Microsoft's web site: Windows SDK setup.exe.

When installing it, make sure to install the Developer Tools, in particular the Windows Vista Headers and Libraries, the Visual C++ Compilers and the Windows Development Tools. Failure to do so would result in a non-working C compiler.

Configuring C compiler to compile from the command line

After you have successfully installed the Windows SDK, the only thing you need to do is to configure some environment variables. The best way to configure them is to use the `setenv.cmd' batch file included in the Windows SDK:

cmd.exe /V:ON /E:ON./K "C:\apps\Windows\v6.0\bin\setenv.cmd" /Release

After executing this command you can invokes the C compiler. Note that the prompt will change color, you may want to use `color 07' to restore to the default white on black.

Information.png Note: Replace c:\apps\Windows\v6.0 by the location where you installed the Windows SDK.

Using espawn Instead

Alternatively you can compile the utilize the espawn tool. The tool mocks the environment used by the Eiffel compiler so global access to Windows SDK tools, such as the C/C++ compiler, is granted. As such there is no need to manually configure your system's environment variables or use the setenv.cmd.

Information.png Note: espawn is not distributed with EiffelStudio so you will need a working Eiffel compiler to compile and make use of it, or you may visit eiffelroom and download the tool.