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

How to build a debug build and disable optimizations and enable -g3 debug flag



  • Hello,

    This is my first post on the Forum so pardon me if this is the wrong arena to ask this question.

    It has remained a mystery to me how to disable optimizations and compile with full debug symbols (-g3) when building the debug target. I have managed to tweak the resulting Makefile generated by the qmake tool but this makes it difficult to reproduce once other changes require re-running qmake.

    I have googled this for a number of days and have come up empty. I think the Qt forum is the place to ask this question.

    Thank you,
    Michael Uman
    Sr. Software Engineer
    Wunder-Bar


  • Lifetime Qt Champion

    Hi @Michael-Uman,

    Do you calll qmake CONFIG+=debug in first place?

    That generates -g compiler option, which has always been enough for me. Why do you need -g3?

    Regards


Log in to reply