[英]What's the proper configuration to build Qt from source for VS 2017 with debug symbols for a project using QML?
I'm having issues trying to build Qt such that I can get the debug symbols to figure out why the application crashes every few days or so. 我在尝试构建Qt时遇到问题,以便可以获取调试符号来弄清楚为什么应用程序每隔几天就会崩溃。 This is for a 64 bit qml application with c++ feeding data from a worker thread.
这是针对64位qml应用程序,其中c ++从工作线程中获取数据。 This is a full screen (with on screen keyboard) application that runs on windows.
这是在Windows上运行的全屏(带有屏幕键盘)应用程序。 Below is the output from config.log with the command given in the first line.
以下是config.log的输出以及第一行中给出的命令。 I've X'ed all personal info.
我已经对所有个人信息进行了X处理。 What would cause the error shown in the last 2 lines?
什么会导致最后两行显示的错误?
Command line: -platform win32-msvc2017 -commercial -prefix win32-msvc2017 -confirm-license -debug-and-release -force-debug-info -nomake examples -nomake tests -skip qtwebengine -skip qt3d
命令行:-platform win32-msvc2017 -commercial -prefix win32-msvc2017 -confirm-license -debug-and-release -force-debug-info -nomake示例-nomake测试-skip qtwebengine -skip qt3d
- C:/Qt/5.12.1/Src/qtbase/bin/licheck.exe yes C:/Qt/5.12.1/Src/qtbase C:/Qt/5.12.1/Src/qtbase win32-msvc win32-msvc
C:/Qt/5.12.1/Src/qtbase/bin/licheck.exe是C:/Qt/5.12.1/Src/qtbase C:/Qt/5.12.1/Src/qtbase win32-msvc win32-msvc
Licensee= XXXXXXXXXXXXXXXXXXXXX Edition="Device Creation" ReleaseDate="2019-01-29" executing config test verifyspec
被许可方= XXXXXXXXXXXXXXXXXXXXX版本=“设备创建” ReleaseDate =“ 2019-01-29”执行配置测试verifyspec
- cd /d C:\\Qt\\5.12.1\\Src\\config.tests\\verifyspec && C:\\Qt\\5.12.1\\Src\\qtbase\\bin\\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" C:/Qt/5.12.1/Src/qtbase/config.tests/verifyspec
cd / d C:\\ Qt \\ 5.12.1 \\ Src \\ config.tests \\ verifyspec && C:\\ Qt \\ 5.12.1 \\ Src \\ qtbase \\ bin \\ qmake.exe“ CONFIG-= qt debug_and_release app_bundle lib_bundle”“ CONFIG + =共享warn_off控制台single_arch” C:/Qt/5.12.1/Src/qtbase/config.tests/verifyspec
- cd /d C:\\Qt\\5.12.1\\Src\\config.tests\\verifyspec && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
cd / d C:\\ Qt \\ 5.12.1 \\ Src \\ config.tests \\ verifyspec &&设置MAKEFLAGS =&jom clean &&设置MAKEFLAGS =&jom
jom 1.1.3 - empower your cores del verifyspec.obj del verifyspec.exp Could Not Find C:\\Qt\\5.12.1\\Src\\config.tests\\verifyspec\\verifyspec.exp jom 1.1.3 - empower your cores cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -IC:\\Qt\\5.12.1\\Src\\qtbase\\config.tests\\verifyspec -I.
jom 1.1.3-授权您的核心del verifyspec.obj del verifyspec.exp找不到C:\\ Qt \\ 5.12.1 \\ Src \\ config.tests \\ verifyspec \\ verifyspec.exp jom 1.1.3-授权您的核心cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -IC: 5.12.1 \\ Src \\ qtbase \\ config.tests \\ verifyspec -I。 -IC:\\Qt\\5.12.1\\Src\\qtbase\\mkspecs\\win32-msvc -Fo @C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\verifyspec.obj.6760.0.jom verifyspec.cpp link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='XXXXXXXX' language=' ' processorArchitecture=' '" /MANIFEST:embed /OUT:verifyspec.exe @C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\verifyspec.exe.6760.94.jom
-IC:\\ Qt \\ 5.12.1 \\ Src \\ qtbase \\ mkspecs \\ win32-msvc -Fo @C:\\ Users \\ XXXXXXX \\ AppData \\ Local \\ Temp \\ verifyspec.obj.6760.0.jom verifyspec.cpp链接/ NOLOGO / DYNAMICBASE / NXCOMPAT / INCREMENTAL:NO / SUBSYSTEM:CONSOLE“ / MANIFESTDEPENDENCY:type ='win32'name ='Microsoft.Windows.Common-Controls'version ='6.0.0.0'publicKeyToken ='XXXXXXXX'language =' 'processorArchitecture =' ' “ / MANIFEST:嵌入/OUT:verifyspec.exe @C:\\ Users \\ XXXXXXX \\ AppData \\ Local \\ Temp \\ verifyspec.exe.6760.94.jom
LINK : fatal error LNK1158: cannot run 'rc.exe'
链接:致命错误LNK1158:无法运行“ rc.exe”
jom: C:\\Qt\\5.12.1\\Src\\config.tests\\verifyspec\\Makefile [verifyspec.exe] Error 1158
作业:C:\\ Qt \\ 5.12.1 \\ Src \\ config.tests \\ verifyspec \\ Makefile [verifyspec.exe]错误1158
If you were using a precompiled Qt SDK for VS2017, then there is no reason to recompile Qt only for getting debug files. 如果您使用的是针对VS2017的预编译Qt SDK,则没有理由仅为了获取调试文件而重新编译Qt。
Starting with Qt5.12, debug files (*.pdb) are available for download with the online installer. 从Qt5.12开始,可通过在线安装程序下载调试文件(* .pdb)。 Just check this option when installing:
只需在安装时检查此选项:
Your PATH doesn't include the location of the "rc.exe" program (the resource compiler). 您的PATH不包含“ rc.exe”程序(资源编译器)的位置。 If you type in the same cmd.exe window the command "where rc.exe" it would say that the file could not be found.
如果您在同一cmd.exe窗口中键入命令“ where rc.exe”,则会显示找不到该文件。
You should call "vcvarsall.bat" to prepare the environment for the compiler and the tools. 您应该调用“ vcvarsall.bat”为编译器和工具准备环境。 For instance:
例如:
C:\Qt\5.12.5\msvc2017_64>call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.15
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Qt\5.12.5\msvc2017_64>where rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.