First post, by ell1e
Dear forum,
I'm thinking of trying to write some software that runs on Windows versions going back to 98SE, mostly because it sounds like fun, and CPUs going back to something like Pentium 3 or around that time (still undecided what exact cut-off I should use, but I'm willing to require something slightly more modern in terms of CPU than in terms of software sack).
Where am I doing this: My main workstation where I'm working on this software is using Linux.
Past attempts: I've already tried targeting Windows XP which was fairly easy. I've noticed other than the code pages, my software doesn't really use anything already present on Win98SE, and for the code pages I might be able to just use the Win API's unicode conversion functions - or perhaps some other library I can track down - to convert it on-the-fly. Then my file path handling might not be able to handle all corner cases but it might be good enough for practical use. I got a working Win98SE VM around, with the usual patches for modern CPUs, and now I'm curious what I could reasonably do.
My question: Does anybody have experienced with modern Mingw-w64 versions in that regard, or are there any other compiler recommendations for doing this?
If preferable I don't want to use some old compiler like an older MinGW version, since I want to compile one single x86 exe that still runs on latest Windows 11, without having any issues of e.g. modern CPU mitigation considerations not being taken into account by the compiler. The compiler needs to be able to handle C89 with C11-like atomic 32bit+46bit ints (simply handling "volatile" correctly might be enough on Intel architecture so I've heard, so I could get away without the C11 annotations but I prefer to use them if available) and _attribute_((constructor)) or similar, and I need to be able to use LoadLibrary() on the usual common libraries like for example the kernel32.dll for features only present on newer versions of windows.
I don't really need any C99 or newer features, or anything else unusual. I don't use much of the more advanced stuff of the C library, e.g. I do string formatting myself.
Any suggestions, or any past experience worth sharing?