How to minimize memory footprint in Qt for Embedded Linux?

There’s no single magical step that can reduce the memory footprint, but there are several things you might wish to consider. One is the use of more aggressive optimization. The other is to use the following flags during configuration:

  1. -no-stl
  2. -no-exceptions

To add the -o3 as a compiler option is pretty straightforward:

In the .pro file, add the following lines:

  1. QMAKE_CFLAGS_DEBUG +=o3
  2. QMAKE_CXXFLAGS_DEBUG +=o3

You should use RELEASE instead of debug in your release version.

Also make sure you remove unnecessary options from your configuration. You should remove any features that you will not use in your final applications.

No comments

Write a comment

Sorry, you must be logged in to post a comment.