Build Qt in "Release with Debug Info" mode?

Viewed 27878

Is there a way to build Qt in "Release with Debug info" mode ? My application crashes only in "release" mode (works fine in Debug mode) and seems the issue comes from Qt (may be a bug in Qt).So I want to see the debug info of Qt.

Qt docs has "debug" , "release" but not "release with debug" mode.

[Upate]

My application works fine with Mingw 32bit Release/Debug and VSC++ Compiler 64bit Debug.

Only crashes on VSC++ 64Bit Release

Any tips ?

8 Answers

In Qt5, when calling configure, just simply add option -force-debug-info

Just select Profile build in the projects tab of Qt Creator rather than the debug or release builds. It will add a lot of arguments to the qmake call.

qmake.exe someproject.pro -spec win32-msvc "CONFIG+=qml_debug" 
"CONFIG+=qtquickcompiler" "CONFIG+=force_debug_info" "CONFIG+=separate_debug_info"

for linux user

./configure -prefix /opt/qt -release -force-debug-info -opensource -nomake tests -no-avx -no-avx2 -no-avx512

make V=1 -j8
make install

ps:cat /proc/cpuinfo, if you have avx avx2 avx512 then remove -no-avx -no-avx2 -no-avx512

Related