run is a C interpreter for Windows -- or more accurately, it
is a compiler and cacher of C programs. When given the file example.c,
run compiles and executes it. The resulting executable, example.exe,
is stored in the same directory, but as a hidden file. Now, any
subsequent time example.c is run, it is re-compiled only if it
has been modified since the last compilation.
First of all, make sure you have all the prerequisites in place. Put run.exe and rungui.exe somewhere in your PATH. To run C files from the command prompt, issue the following command:
C:\> run filename.c [arguments ...]
To run C files from Explorer, set rungui.exe as the default
program for .c files, or use the Open With menu to
run does not include a C compiler nor any standard library.
You must install these manually and add their paths to the relevant
- (Required) C compiler and linker named cl placed somewhere in your PATH
- (Optional) C header files placed somewhere in INCLUDE
- (Optional) C libraries placed somewhere in LIB
If you wish to use run with Visual Studio (C++) and/or the
Windows SDK, you can define the VSDIR and/or SDKDIR environment
variables, and run will automatically set INCLUDE, LIB and PATH
to the correct values:
|If you define...
||Then run will set...
INCLUDE = VSDIR\vc\include
INCLUDE = SDKDIR\include
create or modify an environment variable, run sysdm.cpl (or
right-click on My Computer), select the Advanced tab and click
on Environment Variables.
- Visual C++ Express Edition and the Windows SDK are both freely available for download online. I personally use Visual C++ 2010 and the Windows Server 2003 SP1 Platform SDK.
use a non-Microsoft compiler with run, such as gcc,
just make a copy of it named cl.exe and put its location in
your PATH variable.