×
Namespaces

Variants
Actions

Using shared and static libraries in Qt for Symbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All (S60)
Compatibility
Platform(s): S60 3rd Edition, FP1
S60 3rd Edition, FP2
S60 5th Edition
Symbian
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
Article
Created: User:Kbwiki (26 Nov 2009)
Last edited: hamishwillee (01 Aug 2012)

Description

The LIBS variable in the .pro file holds the libraries to link into a Qt project.

On the Symbian platform, the build system makes a distinction between shared and static libraries. If no extension for the library file name is specified, qmake will try to select the type of the library automatically.

For example,

 LIBS += lmylibrary

will cause qmake to generate a STATICLIBRARY mylibrary.lib statement in the .mmp file if a static library (lib) exists for mylibrary. Otherwise, it will be linked as a shared library (using the LIBRARY mylibrary.lib statement).

To specify the type of the library explicitly, add the proper suffix to the library name:

 LIBS += lmylibrary.dll     # mylibrary is a shared library

or

LIBS += lmylibrary.lib     # mylibrary is a static library


Solution

To specify that the library is either shared or static, add a .dll or .lib suffix, respectively, to the library name.

This page was last modified on 1 August 2012, at 07:41.
47 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.

×