0

I used to run my application on Qt 5.10.0 and I don't remember facing this issue, I do release build and I get the binary without symbols. I downgraded to 5.9.2 with qt creator 4.1 because it is the standard version that comes with CentOS 7 repo so I'll be able to deploy my application as a standard RPM.

With 5.9.2 I choose release build and I still get the huge sized binary, the Makefile is generated with CFLAGS including -g, but If I remove it manually I get the binary without debug symbols. Same thing happens when I do for example qmake CONFIG+=release. Is there some sort of default settings I should override?

Rob
  • 14,746
  • 28
  • 47
  • 65
3bdalla
  • 407
  • 1
  • 10
  • 28

1 Answers1

1

I figured it out by chance. Apparently the qmake spec file

/usr/lib64/qt5/mkspecs/linux-g++/qmake.conf

contained a line saying QMAKE_CFLAGS_RELEASE += -O2 -g ...., it seems this was overriding the default CFLAGS, I removed the line and qmake start the correct build configuration. For some reason, the previous debug build was giving a 220 MB binary while now the debug build gives a 66 MB binary.

3bdalla
  • 407
  • 1
  • 10
  • 28