You could also run the vcvars32.bat file from the directory C:\Program Files\Microsoft Visual Studio 8\VC\bin
(this is in your path) prior to your cl
command.
Like this:
C:\Users\nathan\Desktop>vcvars32
C:\Users\nathan\Desktop>cl minimal.c
vcvars32 calls C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
which sets up the required environment for compiling and linking.
The environment variables are INCLUDE
, LIB
, and PATH
.
The compiler looks for header files in the INCLUDE path during compile, and libraries are fetched from the LIB path during link.