hack-detection/build-msvc.bat
David Korth 85076d7737 build-msvc.bat: Use the static MSVC runtime.
Something's wrong with my MinGW-w64 setup. The compiled executable
doesn't work on Windows XP or Windows 7, or even on Wine. It simply
starts and then exits.

I'll rebuild it using MSVC 2017 for now. Unfortunately, this means
the executable will be bigger, since it statically links the MSVC
runtime instead of using MSVCRT.DLL.
2017-07-07 23:39:55 -04:00

9 lines
337 B
Batchfile

set "CFLAGS=/nologo /O2 /MT /EHsc /Zi /W3"
set "RCFLAGS=/nologo"
set "LDFLAGS=/nologo /debug /opt:icf,ref /incremental:no"
CL /c %CFLAGS% /Fohack-detection.o hack-detection.c
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
RC %RCFLAGS% /foresource.res resource.rc
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
LINK hack-detection.o resource.res %LDFLAGS%