[Development] MinGW with UCRT and Qt
thiago.macieira at intel.com
Thu Feb 10 05:06:19 CET 2022
On Wednesday, 9 February 2022 16:35:00 PST Björn Schäpers wrote:
> I'm upgrading my build environment and switched my MinGW GCC from MSVCRT to
> UCRT. I'm not very far in compiling Qt, but get the following warnings:
> qdatetime.cpp:2372:35: warning: 'tzname' is deprecated: Only provided for
> source compatibility; this variable might not always be accurate when
> linking to UCRT. [-Wdeprecated-declarations]
> return QString::fromLocal8Bit(tzname[isDst]);
> It seems to me that we should use the #if defined(Q_CC_MSVC) path.
> What would be the best way for that? I don't think you want a #if
> defined(Q_CC_MSVC) || defined(_UCRT), or do you?
No, an #ifdef _UCRT should suffice.
There'll be a lot of those places to fix because we haven't paid attention to
the CRT until now. Moreover, there wasn't an UCRT until VS 2015, but many of
the functions in question (including _get_tzname) have been available since VS
2008 or earlier.
> Are there any plans to adapt to UCRT MinGW?
Once it's officially supported by upstream, with default toolchain builds, we
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel DPG Cloud Engineering
More information about the Development