[Qt-creator] Qt Creator Build Environment Windows 10 SDK
henry at tungware.se
Fri Jun 11 10:05:24 CEST 2021
On 2021-06-11 09:45, Christian Bauer wrote:
> I might've found the problem. The following is copied from
> WindowsLibPath=C:\Program Files (x86)\Windows
> Kits\10\UnionMetadata\10.0.19041.0;C:\Program Files (x86)\Windows
> WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
> WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
> WindowsSdkVerBinPath=C:\Program Files (x86)\Windows
> Next I ran:
> set VSCMD_DEBUG=3
> vcvars64.bat > out.txt
> Which results in this error:
> "ERROR: Registry editing has been disabled by your administrator."
> So if vcvarsall can't set Windows 10 SDK paths properly because of
> missing rights to access the registry then why is it working in Visual
> Studio 2019 directly?
> And can there be a workaround that does not involve putting paths
> somewhere manually?
Hi, Visual Studio gets a lucky escape since it's not using
vcvarsall.bat, that .bat file is meant to be run by parties outside of
Visual Studio, like a CMD prompt, Qt Creator etc.
One workaround is to shortcut the broken mechanism, by editing
vcvarsall.bat (it's in C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Auxiliary\Build) and adding a hardcoded set
statement, like this:
"set INCLUDE=C:\Program Files (x86)\Microsoft Visual
Files (x86)\Microsoft Visual
(x86)\Windows Kits\10\include\10.0.19041.0\ucrt;C:\Program Files
(x86)\Windows Kits\10\include\10.0.19041.0\shared;C:\Program Files
(x86)\Windows Kits\10\include\10.0.19041.0\um;C:\Program Files
(x86)\Windows Kits\10\include\10.0.19041.0\winrt;C:\Program Files
Normally the INCLUDE variable is built by calling vsdecvmd.bat in a goto
loop, but if you add that hardcoded "set INCLUDE..." after the loop it
should yield the same result for Qt Creator. The drawback is that you
have to edit that set statement every time you upgrade your Visual
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator