windows build

Paulo Jorge Guedes Paulo.Guedes at artelecom.pt
Tue Jun 27 15:35:17 CEST 2006


> -----Original Message-----
> From: Peter Kümmel [mailto:syntheticpp at gmx.net]
> Sent: terça-feira, 27 de Junho de 2006 13:26
> To: kde-buildsystem at kde.org
> Subject: Re: windows build
> 
> 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.

I think it is your call ;)

Thanks
Paulo


More information about the Kde-buildsystem mailing list