Personal tools
You are here: Home Developer Resources Knowledgebase My executables are very large on the Mac. How can I prevent this ?
Document Actions

My executables are very large on the Mac. How can I prevent this ?



Answer:

Are you using debug symbols ? If so the problem is that the debug symbols that are generated by gcc are rather large. Until recently we could not do much about this, but with the release of Xcode 2.3 you can use Dwarf symbols which are significantly smaller. You can edit your qmake.conf in mkspecs/macx/g++ and change the value of

QMAKE_CFLAGS_DEBUG

to -gdwarf-2

The reason we don't do this by default is that previous versions of Xcode will not work with this flag.

In Qt 4.3, you can make dwarf-2 symbols the default by passing -dwarf-2 on the configure line. Mac OS X 10.5 will use dwarf-2 symbols by default.


dwarf-2 symbols use the sources so the size of the final debug application should compare favorably to a release build.

If you are using a release build, then you should not be getting this problem.


 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: