Search code examples
qtdebuggingreleasefilesize

Qt Creator Release and Debug same filesize


The binary filesize in my release-build is equal to the debug-build of my Qt-Project and the release file is also debugging. I'm using no CMake file but I'm changing the build option in the Qt-Creator.

What else do I have to do to force the Qt-Creator to make the project without debug-symbols?


Solution

  • Finally I figured out what's wrong with my qmake setup. I had to add/modify the following lines in my environment file:

    1. remove -g flags in environment (the result looks like the following lines)

      export CFLAGS=" -O2 -pipe -feliminate-unused-debug-types"

      export CXXFLAGS=" -O2 -pipe -feliminate-unused-debug-types"

    2. add strip

      export OE_QMAKE_STRIP=arm-......-linux-gnueabi-strip