windows build
Peter Kümmel
syntheticpp at gmx.net
Tue Jun 27 14:26:16 CEST 2006
I think now I understand a little bit
better what's going on:
QList<QVariable> is automatically instantiated
because of the inheritance in qdbusmessage.h
But when compiling kdecore, this is not known,
so the compiler instantiates QList<QVariable>
again, and we get the linker error.
To fix the linker error we just have to show
the compiler qdbusmessage.h and all is fine.
$ svn diff kconfigbase.h
Index: kconfigbase.h
===================================================================
--- kconfigbase.h (revision 555414)
+++ kconfigbase.h (working copy)
@@ -27,6 +27,7 @@
#include <qvariant.h>
#include <kdelibs_export.h>
#include <kdebug.h>
+#include <dbus/qdbusmessage.h>
template <typename KT, typename KV> class QMap;
class QString;
And indeed this solves the linker error.
But maybe
+#ifdef Q_OS_WIN
+template class KDE_IMPORT QList<QVariant>;
+#endif
is the better solution because including qdbusmessage.h
is expensive. qdbusmessage.h includes qdbusmacros.h and
there we have:
#ifdef Q_CC_MSVC
#include <QtCore/qlist.h>
#include <QtCore/qset.h>
#include <QtCore/qhash.h>
#include <QtCore/qvector.h>
class QDBusType;
inline uint qHash(const QVariant&) { Q_ASSERT(0); return 0; }
inline uint qHash(const QDBusType&) { Q_ASSERT(0); return 0; }
#endif
and I could remember that this makes other problems.
Peter
More information about the Kde-buildsystem
mailing list