-1

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. This is for a 64 bit qml application with c++ feeding data from a worker thread. This is a full screen (with on screen keyboard) application that runs on windows. Below is the output from config.log with the command given in the first line. I've X'ed all personal info. 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

  • 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

    Licensee= XXXXXXXXXXXXXXXXXXXXX Edition="Device Creation" ReleaseDate="2019-01-29" executing config test 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 && set MAKEFLAGS=& jom clean && set 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. -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

LINK : fatal error LNK1158: cannot run 'rc.exe'

jom: C:\Qt\5.12.1\Src\config.tests\verifyspec\Makefile [verifyspec.exe] Error 1158

Vel JZ
  • 13
  • 2

2 Answers2

1

If you were using a precompiled Qt SDK for VS2017, then there is no reason to recompile Qt only for getting debug files.

Starting with Qt5.12, debug files (*.pdb) are available for download with the online installer. Just check this option when installing:

enter image description here

epsilon
  • 2,849
  • 16
  • 23
0

Your PATH doesn't include the location of the "rc.exe" program (the resource compiler). If you type in the same cmd.exe window the command "where rc.exe" it would say that the file could not be found.

You should call "vcvarsall.bat" to prepare the environment for the compiler and the tools. 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
Former contributor
  • 2,466
  • 2
  • 10
  • 15
  • Doesn't "vs2015 x64 Native Tools Command Prompt" already have this? – Vel JZ Sep 16 '19 at 20:11
  • running "where rc.exe" would tell you that. But I'm, curious: are you trying to build Qt 5.12 with VS2015 ? – Former contributor Sep 16 '19 at 20:27
  • Please also look at this other [SO question](https://stackoverflow.com/questions/43847542/rc-exe-no-longer-found-in-vs-2015-command-prompt) – Former contributor Sep 16 '19 at 20:31
  • ya, looks like it didn't know where rc.exe was, but I'm a little surprised that console didn't know it. I had to add C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64 to path. Calling vcvarsall.bat didn't help for some reason. – Vel JZ Sep 17 '19 at 06:36