Build Qt in “Release with Debug Info” mode?

后端 未结 7 1797
甜味超标
甜味超标 2020-12-30 21:32

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

7条回答
  •  感动是毒
    2020-12-30 21:44

    I use this in my qmake files to build my release versions with debuginfo:

    QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
    QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
    QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
    

    This way you can at least check if the crash happens in your code. Building Qt with this mode is not supported, see this bug. You can only do it manually by changing vcproj-files or Makefiles like in the answer of Macke.

提交回复
热议问题