win32 build stops with linker error
Peter Kümmel
syntheticpp at gmx.net
Tue Feb 7 20:19:14 CET 2006
I've reached the linking of khtml, but it stops with two
strange linker errors (at least only two):
kio.lib(kio.dll) : error LNK2005: "public: class QString & __thiscall QMap<class QString,class QString>::operator[](class QSt
ring const &)" (??A?$QMap at VQString@@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)" (??1?$QMap at VQString@@V1@@@QAE at XZ) already defined in khtml_settings.obj
I think this is because KIO::MetaData (kio/kio/global.h) inherits from QMap.
I've tried without success
1.
declare template instantiation as imported
class QString;
#if defined(Q_CC_MSVC_NET)
template<class U, class V> class QMap;
extern template __declspec(dllimport) QMap<QString,QString>;
#endif
2. and moving the implementation of MetaData to global.cpp
Here is the end at the moment.
Bye,
Peter
More information about the Kde-buildsystem
mailing list