Remix.run Logo
unleaded 6 hours ago

I found out the other day you can use modern clang-cl with the MSVC6 headers and it just works. you can download them from here https://github.com/itsmattkc/MSVC600 or just copy it from an install if you have one handy.

then run (something like) this:

  clang-cl /winsysroot:"" /DWINVER=0x0400 /D_WIN32_WINNT=0x0400 -m32 /GS- -march=i586 -Wno-nonportable-include-path /imsvc"C:\MSVC6\VC98\Include" hello.c -fuse-ld=lld-link /link /SAFESEH:NO /SUBSYSTEM:WINDOWS,4.0 /LIBPATH:"C:\MSVC6\VC98\Lib" user32.lib kernel32.lib msvcrt.lib
I don't know if it's any better or worse than MinGW practically but it is definitely cursed.