pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mingw default crt is surprising
I had the need to compile some windows code recently, so I had a look
at mingw-w64 from pkgsrc. I was quite surprised that it linked
against a C++ runtime that my Windows machine didn't have, given
I was compiling boring C99 code.
After some research, it appears to be due to this change:
v12.0.0: 2024-05-29
"Important: UCRT is now the default CRT runtime instead of MSVCRT, check the
mingw-w64-doc/howto-build/ucrt-vs-msvcrt.txt document for details. Both
header set and CRT must be configured and built with the same settings
consistently for proper functionality. Switching runtimes requires all
libraries to be rebuilt, including GCC."
After some more research, I realized other vendors are distributing
two different versions of MinGW, one with UCRT and the other with
MSVCRT for supporting Windows before 10:
https://winlibs.com/
Then I did some research (not used Windows in 10 years!) and found
roughly 5% of Windows users are on versions before 10.
I'd like my boring C99 code to be as portable as possible, and to
support those 5%. But I'm unsure how to deal with this mess.
Add a mingw-w64-msvcrt package? Add a PKG_OPTION?
Swallow my pride and bootstrap an older pkgsrc version to
some PREFIX?
Home |
Main Index |
Thread Index |
Old Index