PDA

View Full Version : Qt static and dynamic linking same time to third dll



vishwajeet.dusane
27th July 2010, 19:56
Hi,

I have created static and dynamic Qt library. Now while building my application dll i want to use QtCore dynamically linked and QtGui statically to my dll (shared library) as i am using only 1 non-gui QDesktopService instance. And i dn't want complete QtGui to be packaged.

Now is it possible to link QtCore dynamically and QtGui statically? if yes then How ?

I have modified .pro file accordingly


QT -= gui

LIBS += -lQtGui4-static



but when i do that i get linking error on windows


error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QDesktopServices::storageLocation(enum QDesktopServices::StandardLocation)" (__imp_?storageLocation@QDesktopServices@@SA?AVQSt ring@@W4StandardLocation@1@@Z) referenced in function