rem cl32dll.bat compile and link 32 bit C/C++ DLL %1 on command line is name of source module without extension. Result is xxx.32.dll if exist %1.c set option= if exist %1.c set source=%1.c if exist %1.cpp set option=/TP if exist %1.cpp set source=%1.cpp set out=%1.32.dll rem rem see notes on configuring sets for your C/C++ compiler at http://mindprod.com/jgloss/cpp.html "F:\Program Files (x86)\VC\bin\cl.exe" /O2 /IQ /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /EHsc /MT /Gy /W3 /nologo /c /LD /errorReport:prompt %option %source "F:\Program Files (x86)\VC\bin\link.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST:NO /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /DYNAMICBASE /NXCOMPAT /ERRORREPORT:PROMPT /MACHINE:X86 /DLL /OUT:%out kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib winmm.lib %1.obj rem -30-