Building a library project in Qt using Qt Creator
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.
- Create a new library project in Qt Creator as shown in the image below. Qt Creator generates all the needed files.
- 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.
Freezing a project
- 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
- Once we have the Command Prompt, we change our current working directory to match the directory of the project we need to freeze.
- 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!