Peter Kümmel wrote: > David Faure wrote: >> On Tuesday 07 February 2006 23:05, Peter Kümmel wrote: >>> David Faure wrote: >>>> On Tuesday 07 February 2006 20:29, Christian Ehrlicher wrote: >>>>>> kio.lib(kio.dll) : error LNK2005: "public: class QString & __thiscall >>>>>> QMap<class QString,class QString>::operator[](class QSt >>>>>> ring const &)" ([EMAIL PROTECTED]@@V1@@@QAEAAVQString@@ABV1@@Z) already >>>>>> defined in khtml_printsettings.obj >>>>>> kio.lib(kio.dll) : error LNK2005: "public: __thiscall QMap<class >>>>>> QString,class QString>::~QMap<class QString,class QString>(v >>>>>> oid)" ([EMAIL PROTECTED]@@V1@@@[EMAIL PROTECTED]) already defined in >>>>>> khtml_settings.obj >>>> Buuh :( >>>> >>>> IIRC you need "template class QMap<QString,QString>;" in global.cpp >>>> to force a template instantiation there, so that dependent libs don't do >>>> it themselves. >>> I've tested it, but this doesn't help, like the error message indicates: >>> there is already a instantiation in kio. >> I just saw something similar in another project here. >> It seems that the explicit instantiation should be in the .h, not in the >> .cpp, >> and with dlllimport. >> Hmm, that's what you tried first, but try with s/extern template/template >> class/ ? >> >> Please don't change the base class, we would have to redefine the whole QMap >> API... >> > > #ifdef Q_OS_WIN > template class __declspec(dllexport) QMap<QString, QString>; > #endif > > Does the job. > Peter
Maybe we could also fix this error by including kio/kio/global.h at the right place in khtml. But currently the build system is broken on win2k, because moc is called with too much parameters thus the command line becomes too long. Peter _______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
