Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Building a library project in Qt using Qt Creator

From Wiki
Jump to: navigation, search

This article shows how to create a shared DLL project using Qt Creator. The instructions include the extra step required for the Symbian platform of freezing the API.

Article Metadata
Tested with
SDK: Qt SDK 1.1 (Qt Creator 2.2.1)
Platform(s): Symbian^1 and later
Keywords: freeze library def
Created: favoritas37 (29 Jul 2011)
Last edited: hamishwillee (13 Jun 2012)


  1. Create a new library project in Qt Creator as shown in the image below. Qt Creator generates all the needed files.
  2. When compiling the project for Symbian, you will get a warning Frozen .def file \QtSDKProjects\eabi\testLibrary.def not found - project not frozen. This warning reminds you that you need to freeze the exports before release, so as to ensure that subsequent releases are backwards compatible.

Note.pngNote: The Symbian Platform uses "link by ordinal" (rather than "link by name"). In order to ensure that different versions of the library are compatible, functions have to be exported from the same ordinal position. We achieve this by storing ("freezing") the ordinal position of each function in a .def file, and using this file to define the function position each time the DLL is rebuilt.

Freezing a project

Tip.pngTip: Unfortunately we can't freeze the API from Qt Creator. Instead we need to open a command prompt and call qmake directly

  1. To begin with, we need to open a command prompt whose environment will be configured for our target platform. For example, to do this on Windows 7 targeting Symbian^3 Qt 4.7.3, you can go under: "Start" -> "All programs" -> "Qt SDK" -> "Symbian^3 Qt 4.7.3" and open Qt 4.7.3 for Symbian^3 Command Prompt
  2. Once we have the Command Prompt, we change our current working directory to match the directory of the project we need to freeze.
  3. Then it's time to freeze the project. Type the following command:
    abld freeze gcce

If the above operation completed without errors you are done!


This page was last modified on 13 June 2012, at 10:51.
129 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.