From 49e9186edf03228ad482a7cce17b12f8dcdba539 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 28 Oct 2024 18:31:14 +0100 Subject: [PATCH] Support Windows 7+ instead of Windows 10+ (#36) * Move -g0 -O2 from CPPFLAGS to CFLAGS/CXXFLAGS That's the more correct way to pass such options to the compiler * Support Windows 7+ instead of Windows 10+ --- build-exe/vars.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-exe/vars.ps1 b/build-exe/vars.ps1 index 3484748..fdf3ffb 100644 --- a/build-exe/vars.ps1 +++ b/build-exe/vars.ps1 @@ -190,11 +190,11 @@ $configureArgs = @( # The strip command "STRIP='$mingwHost-strip'", # The C/C++ preprocessor flags - "CPPFLAGS='-I$cygwinInstalledPath/include -I/usr/$mingwHost/sys-root/mingw/include -g0 -O2'", + "CPPFLAGS='-I$cygwinInstalledPath/include -I/usr/$mingwHost/sys-root/mingw/include -DWINVER=0x0601 -D_WIN32_WINNT=0x0601'", # The flags for the C compiler - "CFLAGS=''", + "CFLAGS='-g0 -O2'", # The flags for the C++ compiler - "CXXFLAGS='-fno-threadsafe-statics'", + "CXXFLAGS='-g0 -O2 -fno-threadsafe-statics'", # The flags for the linker "LDFLAGS='-L$cygwinInstalledPath/lib -L/usr/$mingwHost/sys-root/mingw/lib'", "--host=$mingwHost",