ECHO OFF

REM  This .bat file will compile and link a .c file into a .dll.
REM
REM  Usage: compileDLLforVEE filename.c <ENTER>
REM
REM
REM  Notes:
REM
REM  cl invokes the Microsoft Visual Studio C compiler.
REM  You must have paths to the VS folders for this to work.
REM  If paths are not set then run this file in a Visual Studio Command Prompt found under:
REM  Start > Microsoft Visual Studio > Visual Studio Tools
REM
REM  /DWIN32 selects WIN32 constants.
REM
REM  /LD tells compiler to make a .dll file.
REM
REM  /Fa tells compiler to save the .asm file. (Not req'd, but interesting)
REM
REM  After compile/link is complete, resulting .asm, .exp, .obj, and .lib files may be deleted.
REM
REM  This tested succesfully with Visual Studio 8 and Visual Studio 10 compilers.
REM
REM  Usage: compileDLLforVEE filename.c <ENTER>
REM
REM  B. Drago, 08-08-2011

ECHO ON
 
cl /DWIN32 /LD /Fa %1