[Qbs] MSVC based profile: how SDK detection is working?

Jochen Ulrich jochen.ulrich at bee360.com
Fri Mar 7 08:12:27 CET 2025


Hi Heiko!

The winSdkVersion inside MsvcProbe.qbs is an input which is set from the cpp.windowsSdkVersion property (see https://qbs.io//docs/qml-qbsmodules-cpp/#windowsSdkVersion-prop<https://qbs.io/docs/qml-qbsmodules-cpp/#windowsSdkVersion-prop>).

As it seems to me, the “detection” of the SDK version is done by MSVC itself. So, if you don’t set the cpp.windowsSdkVersion explicitly, then Qbs doesn’t know which SDK version it is working with. If you set it, then Qbs simply passes this to vcvarsall.bat to figure out the necessary environment variables (see vsenvironmentdetector.cpp, line 243-244<https://code.qt.io/cgit/qbs/qbs.git/tree/src/lib/corelib/tools/vsenvironmentdetector.cpp#n243>).

Best
Jochen

Von: Qbs <qbs-bounces at qt-project.org> im Auftrag von Heiko Nardmann <heiko.nardmann at itechnical.de>
Datum: Donnerstag, 6. März 2025 um 18:17
An: qbs at qt-project.org <qbs at qt-project.org>
Betreff: [Qbs] MSVC based profile: how SDK detection is working?

Hi together,

I'm currently fighting with getting Qbs working with MSVC 2022. Somehow the probing fails and I wonder whether this has sth to do with the SDK version: that is shown as being undefined when dumping it inside MsvcProbe.qbs.

So ... how do I tell Qbs which Windows SDK version to use? Or how is the detection working wrt. this?



Kind regards,

  Heiko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20250307/8ed83658/attachment.htm>


More information about the Qbs mailing list