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.
Using Symbian C++ in the Qt SDK
This article explains what you need to do in order to write mixed Qt and Symbian C++ code using the Qt SDK. This is an important topic because the Qt SDK has been discontinued.
The Qt SDK is the recommended SDK for Qt application development. It contains all the APIs necessary for cross platform development with Qt, including the Qt Mobility APIs which provide access to key mobile functionality. From Qt 4.7.2Qt SDK is the recommended SDK for developing applications that mix Qt and Symbian C++ code.
What APIs can you use with the Qt SDK?
The Qt SDK has build targets for Symbian^1 and Symbian^3. These contain most of the APIs from the corresponding native Symbian C++ SDKs. This means that for most Symbian C++ APIs you can build against the Qt SDK as you would have for the original native SDK.
Note however that if you're targeting S60 3rd Edition devices using the Symbian^1 target, compatibility cannot be guaranteed. If you build using the Qt SDK you will need to test more thoroughly. If you run into compatibility problems you may need to use the approaches outlined in the next section.
What if an API is not present in the Qt SDK?
Some APIs will not be present in the Qt SDK (there is no list, so please add any you find as a comment to this article). In addition, if you're targeting S60 3rd Edition devices, you might want to compile the Symbian-specific parts of your code against the associated SDK to improve compatibility.
In either case, you have two main options:
- Copy the missing libraries, headers and link libraries across from the Symbian SDK into the Qt SDK and then build as normal
- Build the Symbian part of your application as a shared DLL against the native SDK, then copy your library to the Qt SDK for Qt side development
The first option is the simplest option as you don't need to set up another IDE or do anything special to bundle executables built against another SDK with your application. The second option is only preferred in cases where you would otherwise have to overwrite libraries already in the SDK, or if you need to improve backwards compatibility with S60 3rd Edition devices.
Where do I copy files into the Qt SDK?
For a Symbian^3 target you will need to copy the required headers (.h) and link libraries (.dso) into the locations listed below (on default installation)
- C:\QtSDK\Symbian\SDKs\Symbian3\epoc32\include\ (system include directory, headers go here)
- C:\QtSDK\Symbian\SDKs\Symbian3\epoc32\release\armv5\lib\ (link library directory, .dso goes here)
These would be copied from the equivalent folders in the native Symbian C++ SDK.
If you've built the dlls in the other SDK, these would also have to be copied across. Typically these would be copied here:
If you're using Symbian^1 the steps are the same, but you use the SDK at C:\QtSDK\Symbian\SDKs\Symbian1\
Frequently Asked Questions
Can we rebuild Qt against a Symbian PDK?
In theory, but this may be more trouble than it is worth. Rebuilding Qt requires RVCT 2.2 (which is difficult to get) and a Symbian PDK (which is no longer produced).
What if I want to use Carbide.c++ IDE?
The Qt SDK comes with Qt Creator, which is the recommended IDE for Qt development.
Carbide.c++ is not configured out of the box to work with the Qt SDK (in Carbide.c++ v2.7), and at time of writing there are no instructions that explain how to do so. However there is nothing to stop you developing the Symbian C++ component of your application in Carbide.c++, and only switching to Qt Creator for the UI development.