[Qt-creator] Qt Creator Build Environment Windows 10 SDK

Henry Skoglund 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 
> "dd_vsdevcmd16_env.log".
>
> Laptop
>
> ========================
>
> WindowsLibPath=References\CommonConfiguration\Neutral
>
> WindowsSDKLibVersion=winv6.3\
>
> WindowsSDKVersion=\
>
> PC
>
> ========================
>
> WindowsLibPath=C:\Program Files (x86)\Windows 
> Kits\10\UnionMetadata\10.0.19041.0;C:\Program Files (x86)\Windows 
> Kits\10\References\10.0.19041.0
>
> WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
>
> WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
>
> WindowsSDKLibVersion=10.0.19041.0\
>
> WindowsSdkVerBinPath=C:\Program Files (x86)\Windows 
> Kits\10\bin\10.0.19041.0\
>
> WindowsSDKVersion=10.0.19041.0\
>
> 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 
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\include;C:\Program 
Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include;C:\Program Files 
(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 
(x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt"

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 
Studio :-(

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210611/d01f58ba/attachment-0001.html>


More information about the Qt-creator mailing list