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
You 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.