windows build

Peter Kümmel syntheticpp at
Mon Jun 26 22:07:36 CEST 2006

Peter Kuemmel wrote:
> --- Bill Hoffman <bill.hoffman at> wrote:
>> There seems to be an issue with dbus on windows:
>> dbus-qt4-1.lib(dbus-qt4-1.dll) : error LNK2005:
>> "public: bool __thiscall QList<class
>> QVariant>::isEmpty(void)const "
>> (?isEmpty@?$QList at VQVariant@@@@QBE_NXZ) already
>> defined in kauthorized.obj
> Currently I've no msvc build here, but
> maybe this thread helps a bit:

Please try this patch:

Index: src/qdbusmessage.h
--- src/qdbusmessage.h  (revision 555242)
+++ src/qdbusmessage.h  (working copy)
@@ -37,6 +37,10 @@
 class QDBusConnectionPrivate;
 struct DBusMessage;

+#ifdef Q_OS_WIN
+template class QDBUS_EXPORT  QList<QVariant>;
 class QDBUS_EXPORT QDBusMessage: public QList<QVariant>
     //friend class QDBusConnection;

It's the same as in the mentioned thread:
inheriting from a Qt template in a header.
The solution was to export the template, see kio/kio/global.h

Hope this solves the linker error,

More information about the Kde-buildsystem mailing list