我正在尝试使用 MSVC2019 套件构建 Qt 的模拟时钟示例,但是 Qt Creator 抱怨如下。我很好奇为什么需要 lld-link.exe,而我想使用 MSVC2019 作为编译器。
我觉得有趣的是在 Makefile.Debug 中,CC 和 CXX 设置为 clang-cl。
我可能会误解 Qt Creator / Qt Examples 如何使用 MSVC2019。
任何评论都非常感谢。
套件配置
编译输出
01:49:57: Running steps for project analogclock...
01:49:57: Starting: "C:\Qt\6.1.2\msvc2019_64\bin\qmake.exe" C:\Qt\Examples\Qt-6.1.2\widgets\widgets\analogclock\analogclock.pro -spec win32-clang-msvc "CONFIG+=debug"
01:49:57: The process "C:\Qt\6.1.2\msvc2019_64\bin\qmake.exe" exited normally.
01:49:57: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" -f C:/Qt/Examples/Qt-6.1.2/widgets/widgets/build-analogclock-Desktop_Qt_6_1_2_MSVC2019_64bit-Debug/Makefile qmake_all
jom 1.1.3 - empower your cores
01:49:57: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited normally.
01:49:57: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
clang-cl -c -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\analogclock.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\analogclock -I. -IC:\Qt\6.1.2\msvc2019_64\include -IC:\Qt\6.1.2\msvc2019_64\include\QtWidgets -IC:\Qt\6.1.2\msvc2019_64\include\QtGui -IC:\Qt\6.1.2\msvc2019_64\include\QtCore -Idebug -IC:/VulkanSDK/1.0.51.0/Include -IC:\Qt\6.1.2\msvc2019_64\mkspecs\win32-clang-msvc -Fodebug\ @C:\Users\MIKE-~1\AppData\Local\Temp\analogclock.obj.3280.0.jom
clang-cl -BxC:\Qt\6.1.2\msvc2019_64\bin\qmake.exe -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -E C:\Qt\6.1.2\msvc2019_64\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h
C:\Qt\6.1.2\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --compiler-flavor=msvc --include C:/Qt/Examples/Qt-6.1.2/widgets/widgets/build-analogclock-Desktop_Qt_6_1_2_MSVC2019_64bit-Debug/debug/moc_predefs.h -IC:/Qt/6.1.2/msvc2019_64/mkspecs/win32-clang-msvc -IC:/Qt/Examples/Qt-6.1.2/widgets/widgets/analogclock -IC:/Qt/6.1.2/msvc2019_64/include -IC:/Qt/6.1.2/msvc2019_64/include/QtWidgets -IC:/Qt/6.1.2/msvc2019_64/include/QtGui -IC:/Qt/6.1.2/msvc2019_64/include/QtCore -I. -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" ..\analogclock\analogclock.h -o debug\moc_analogclock.cpp
clang-cl -c -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\analogclock.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\analogclock -I. -IC:\Qt\6.1.2\msvc2019_64\include -IC:\Qt\6.1.2\msvc2019_64\include\QtWidgets -IC:\Qt\6.1.2\msvc2019_64\include\QtGui -IC:\Qt\6.1.2\msvc2019_64\include\QtCore -Idebug -IC:/VulkanSDK/1.0.51.0/Include -IC:\Qt\6.1.2\msvc2019_64\mkspecs\win32-clang-msvc -Fodebug\ @C:\Users\MIKE-~1\AppData\Local\Temp\main.obj.3280.63.jom
clang-cl -c -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\analogclock.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\analogclock -I. -IC:\Qt\6.1.2\msvc2019_64\include -IC:\Qt\6.1.2\msvc2019_64\include\QtWidgets -IC:\Qt\6.1.2\msvc2019_64\include\QtGui -IC:\Qt\6.1.2\msvc2019_64\include\QtCore -Idebug -IC:/VulkanSDK/1.0.51.0/Include -IC:\Qt\6.1.2\msvc2019_64\mkspecs\win32-clang-msvc -Fodebug\ @C:\Users\MIKE-~1\AppData\Local\Temp\moc_analogclock.obj.3280.344.jom
lld-link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\analogclock.exe @C:\Users\MIKE-~1\AppData\Local\Temp\analogclock.exe.3280.2329.jom
'lld-link' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Qt\Examples\Qt-6.1.2\widgets\widgets\build-analogclock-Desktop_Qt_6_1_2_MSVC2019_64bit-Debug\Makefile.Debug [debug\analogclock.exe] Error 1
jom: C:\Qt\Examples\Qt-6.1.2\widgets\widgets\build-analogclock-Desktop_Qt_6_1_2_MSVC2019_64bit-Debug\Makefile [debug] Error 2
01:50:00: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project analogclock (kit: Desktop Qt 6.1.2 MSVC2019 64bit)
When executing step "Make"
01:50:00: Elapsed time: 00:03.
生成文件.DEBUG
#############################################################################
# Makefile for building: analogclock
# Generated by qmake (3.1) (Qt 6.1.2)
# Project: ..\analogclock\analogclock.pro
# Template: app
#############################################################################
MAKEFILE = Makefile.Debug
EQ = =
####### Compiler, tools and options
CC = clang-cl
CXX = clang-cl
DEFINES = -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -utf-8 -W3 /Fddebug\analogclock.vc.pdb $(DEFINES)
CXXFLAGS = -nologo -Zc:wchar_t -Wno-microsoft-enum-value -fms-compatibility-version=19.29.30038 -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\analogclock.vc.pdb $(DEFINES)
INCPATH = -I..\analogclock -I. -IC:\Qt\6.1.2\msvc2019_64\include -IC:\Qt\6.1.2\msvc2019_64\include\QtWidgets -IC:\Qt\6.1.2\msvc2019_64\include\QtGui -IC:\Qt\6.1.2\msvc2019_64\include\QtCore -Idebug -IC:/VulkanSDK/1.0.51.0/Include -IC:\Qt\6.1.2\msvc2019_64\mkspecs\win32-clang-msvc
LINKER = lld-link