Digital Mars C++ 8.57 (https://digitalmars.com/download/freecompiler.html) is almost perfect for legacy Win32 compatibility, it works in Windows NT 3.5 and up and Windows 95 and up, but it doesn't work in Windows NT 3.1, for both the compiler itself and applications compiled with it.
When compiling an empty program ("int main(){}"), the function FreeEnvironmentStringsA is missing. Declaring that function manually (such as BOOL WINAPI FreeEnvironmentStringsA(LPCH penv) {return 1;} ) allows the empty program to run, but when the printf function is used (such as int main(){printf("test");} ), the function GetStringTypeA is missing. Declaring a dummy function GetStringTypeA makes it work, but when the time() function is used (such as int main(){printf("test %d",time(NULL));} ), the function LCMapStringA is missing. That's at least three Windows NT 3.5 functions that the compiled programs are dependent on. However, when I compile the programs with -L/su:windows:4.0 to make it a non-console application, it specifies "Unexpected error: 11." when ran on Windows NT 3.1, even with the dummy functions thrown in, but it works in Windows NT 3.5.
It seems that the Windows NT 3.5 dependencies are embedded in snn.lib which is used during linking of programs compiled with Digital Mars. Searching for the Windows NT 3.5 functions (FreeEnvironmentStringsA, GetStringTypeA, LCMapStringA) within the snn.lib file reveals the source code files that contain those functions (for example the string "FreeEnvironmentStringsA" occurs at 0000098C, but at some point before, the string "..\core32\cinit.asm" occurs at 00000704, and the FreeEnvironmentStringsA function is indeed embedded in https://github.com/DigitalMars/dmc/blob/master/src/CORE32/cinit.asm ). So if the library functions could be rewritten to not use the Windows NT 3.5 functions, the snn.lib could be recompiled from source to be Windows NT 3.1 compatible (therefore allowing compiled applications to run in Windows NT 3.1), and the compiler itself could also be recompiled from source to run on Windows NT 3.1. However, more research is needed to figure out how to compile the snn.lib file and the compiler itself.
Due to server slowness, downtime, and other issues, guests can no longer search the forum or view user accounts. At some point in the future Eclipse will be moving to a more stable and efficient platform that should result in much better stability and the lifting of these restrictions. There is no timeline for this yet, just want you to know what's happening with all the downtime and I have a plan to fix it.
