[Qt-interest] How to use my own static lib in another project?

Stephen Collyer scollyer at netspinner.co.uk
Tue May 19 14:54:01 CEST 2009


2009/5/19 Yao Huiji <spideryao at gmail.com>

> hi,
>
>
>> class Q_DECL_EXPORT Settings : public QObject
>
>
How is Q_DECL_EXPORT defined ? It should be
defined as __declspec(dllexport) when you are building the
library, and __declspec(dllimport) when you are using
the header file in another compilation unit.

If you don't define Q_DECL_EXPORT correctly when you build
the library, then none of the symbols in the class will be exported
in the dll, and so they will not be available when you link against
the dll. This could explain what you are seeing.

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/0af744ea/attachment.html 


More information about the Qt-interest-old mailing list