Jump to content

Mingw32 Toolchain which uses CRTDLL.DLL instead of MSVCRT.DLL (C++ for Pre-2000)


Recommended Posts

Earlier versions of Windows come with CRTDLL.DLL, but not MSVCRT.DLL

With a few minor patches to GCC it's possible to make it link against CRTDLL.DLL by default instead of MSVCRT.DLL. This means when you compile using the patched toolchain your program assuming it uses no features only available on newer versions of Windows will automatically work on older versions of Windows such as NT 3.51.

By using the files from Mingw32 instead of Mingw-w64 it resolved an issue where DLLs would have a .tls section and LoadLibrary would fail on Windows 95 or it would cause crashing on Windows 98 or Windows 2000. I put C++ for pre-2000 in the title because I also patched out a few functions in libstdc++ which require Windows 2000 or later.

If you are running Arch Linux you can checkout the PKGBUILD files. https://github.com/ComputerNerd/mingw32-crtdll

If you are not a Linux person but want to use this, you can run Arch Linux using a Virtual Machine or look at the PKGBUILD files and run them manually.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...