Optimizing a single library

Optimizing a single library doesn't reduce the library as effectively as optimizing all libraries simultaneously, because the System Optimizer accounts for dependencies.

To reduce a library such as libc using the Dietician, you must iteratively optimize each individual library in your project between two and five times (depending on the number of dependency levels).

You can reduce a single library to its optimum size if it has no dependencies.

To optimize a single library in an image:
  1. If your project isn't already open, double-click its project.bld file in the System Builder Projects view.
  2. In the QNX System Builder editor, expand the Shared Libraries list and select the library you want to optimize.
  3. In the toolbar, click the Optimize System button ().
  4. In the System Optimizer, select the Apply diet(s) system wide option.
  5. Click Next. In the next few pages, the Dietician shows the unnecessary libraries, any additional needed libraries, and the libraries that can be optimized.
  6. Click Finish. The Dietician removes unused libraries, adds the additional required libraries, and generates new, reduced libraries. Reduced libraries are added to your project's Reductions/image_name directory.