Hello!

Someone reported an issue a while ago and I created a ticked just yesterday in 
order to to not forget it.
https://bugreports.qt.io/projects/QBS/issues/QBS-1724

I suppose, the issue was introduced by this patch 
https://codereview.qt-project.org/c/qbs/qbs/+/459921 which was an attempt to 
fix Qbs build with mingw - mingw headers are broken in a way that the old value 
leaded to incorrect macros in Windows.h

If you find a way to fix Qbs build and actual binaries, you’re welcome to 
submit a patch.

Note that CMake sets (major|minor)-subsystem-version to 0 (unconditionally?) 
when building for mingw.
Maybe you can set those to 0 for _linking_ while setting the correct 
WINVER/whatever macro Qbs sets for _compiling_.

Also, this should be fixed by mingw upstream - otherwise those flags are 
useless.

Ivan


> 10 апр. 2023 г., в 22:42, Björn Schäpers <qt-maill...@hazardy.de> написал(а):
> 
> Good Day,
> 
> I was recently forced to use Windows 11 at work and was puzzled why many of 
> my programs (but not all!) failed to start with the code 0xc00007b. After a 
> lot of investigation I found the issue to be the subsystem values.
> 
> All affected programs use Qt, which sets the minimum windows version to 10, 
> and the gcc.js (I'm using MinGW) uses this value for the os version as well 
> as the said subsystem version. And those programs do not start on Windows 11, 
> Windows 10 had no problems with that.
> 
> I've inspected a few programs, I've found none which didn't set the value 
> (and the os version too by the way) to anything higher than 6. That includes 
> the CMake generated Qt programs (moc, qmake, etc.) and Microsoft programs 
> like Notepad, Teams, and Outlook.
> 
> I help myself with omitting the parameters right now. What is your take on 
> that? If I propose a patch to not set the subsystem version, does it have a 
> chance to be accepted?
> 
> I've not tested anything with MSVC, but would except the same behavior since 
> it just sets the field in the PE header.
> 
> Kind regards,
> Björn.
> _______________________________________________
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to