win32 build stops with linker error

Peter Kümmel syntheticpp at gmx.net
Wed Feb 8 11:52:45 CET 2006


Peter Kümmel wrote:
> 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 solved the problem, now it builds khtml here.

Indeed it was KIO::MetaData. When I change the implementation
of MetaData from "is a QMap" to "has a QMap" it links fine.

I prepare a patch and send it to kde-buildsystem at kde.org.

Peter




More information about the Kde-buildsystem mailing list