Creating a Qt Application Release Configuration with Symbols

I am currently using Qt Creator on Windows to build my application and am building my application in the release configuration using debugging symbols, but have not found anything for MSVCC. Currently, I have an error in my application that occurs only in the release configuration, not for debugging, so being able to hit breakpoints on release will be a big help with this.

+4
source share
1 answer

If you switch to CMake, this is an option (I believe that QtCreator supports CMake and QMake projects), then you can use the CMake build type "RelWithDebInfo" to accomplish what you are looking for.

However, if CMake is not an option, you can configure the project file to include debugging information:

QMAKE_CFLAGS_RELEASE += -Zi QMAKE_CXXFLAGS_RELEASE += -Zi QMAKE_LFLAGS_RELEASE += /DEBUG /OPT:REF 

Or if you are using gcc / mingw:

 QMAKE_CFLAGS_RELEASE += -g QMAKE_CXXFLAGS_RELEASE += -g 
+7
source

Source: https://habr.com/ru/post/1389594/


All Articles