programs (note that this assumes that you have installed the latest R, version 2.9.0):
c:/mingw/bin/gcc -I"c:/program files/R/R-2.9.0/include" -L"C:/Program Files/R/R-2.9.0/bin" -Wall %1.c -o %1.exe -lRlapack -lRblas
gcc
is the
compiler (you can always edit your PATH statement to include c:\mingw\bin),
-I"c:/program files/R/R-2.9.0/include
tells gcc to look for additional header files in that path. (The
C Standard Library is
in the path C:\mingw\include\ .)
-L"C:/Program Files/R/R-2.9.0/bin" tells gcc to
look for DLL's in that directory. In particular, the LAPACK and BLAS dynamic linked
libraries (DLLs) are in that path. -Wall
tells gcc to show all the warnings to the terminal screen.
%1.c -o %1.exe tells
gcc to compile the C program
named "%1".C, where "%1" is a wildcard (see screen shot below) and name the compiled
program "%1".exe. Finally, -lRlapack -lRblas
tells gcc to also link (include in the executable) the appropriate
subroutines in Rlapack.dll and Rblas.dll (these are in the directory
C:/Program Files/R/R-2.9.0/bin).

And this is what you should see when you run OLS.EXE:
