rem cl64dll.bat compile and link 64 bit C/C++ DLL %1 on command line is name of source module without extension. Result is xxx.64.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.64.dll rem see notes on configuring sets for your C/C++ compiler at http://mindprod.com/jgloss/cpp.html rem do not change WIN32 to WIN64 "F:\Program Files (x86)\VC\bin\x86_amd64\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\x86_amd64\link.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST:NO /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /DYNAMICBASE /NXCOMPAT /ERRORREPORT:PROMPT /MACHINE:X64 /DLL /OUT:%out kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib winmm.lib %1.obj rem -30-