Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT_NO_DEBUG_OUTPUT - why do I need to compile from scratch when switching between debug and release?



  • Hello,

    I would like to ask somebody for explanation of the following issue:
    I switched off "shadow copy". Both debug and release versions are created in the same directory. My pro file contains line:

    CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
    

    so it is expected to hide all debug information when compiled in release mode.

    And now the important thing - when compiling from scratch, the behavior is correct, i.e. there is no messages when release mode, and debug is present when debug mode is on. But when it is once compiled as debug and then as release - debug information is present. And reversely - having release compiled first, debug second, there is no any debug information on console.

    Could somebody explain why is that? Is qmake making some optimizations and since header are intact, the assumption is made that there were no change in code (despite some extra flag?).

    Thank you in advance.


  • Lifetime Qt Champion

    Hi
    i would suspect .qmake.stash left over or similar file.
    However i have not tested this assumption.


Log in to reply