Reputation: 43
I have a simple console application which I already ported to Windows. I also cross-compile it using mingw. However the problem is applications compiled like this only run on Windows Vista or newer. How would I go about compiling it for XP using Linux? Also, I don't know if this is necessary, but here are my compiler flags:
x86_64-w64-mingw32-windres src/icon.rc src/icon.o
x86_64-w64-mingw32-g++ -o cli-mg-64bit-windows.exe src/main.cpp src/icon.o -static
i686-w64-mingw32-windres src/icon.rc src/icon.o
i686-w64-mingw32-g++ -o cli-mg-32bit-windows.exe src/main.cpp src/icon.o -static
Upvotes: 2
Views: 841
Reputation: 7287
You seem to use a version of MinGW-w64 that was built with configure
flags --with-default-msvcrt=msvcrt-os
and --with-default-win32-winnt=0x0501
.
These flags will result in MinGW-w64 libraries that will only use Windows features available up to Windows XP.
For a list of values and their corresponding Windows version see: https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
Upvotes: 3