At least QList<double> Exported to EsriRuntimeQt.dll/EsriRuntimeQtd.dll

2518
3
04-19-2016 07:28 AM
DanielBachmann1
New Contributor

Hi,

just found that at least symbols from QList<double> are exported to EsriRuntimeQt.dll/EsriRuntimeQtd.dll.

As soon as for example "ResolutionList.h" is included, a class with e.g. a QList<double> member will lead to linker errors because of multiple defined symbols. I 've attached a minimal example. Had to force to ignore multiple defined symbols with

QMAKE_LFLAGS += /FORCE:MULTIPLE

to link properly, which is not what one wants to do!

Seams that something went wrong compiling the windows binaries...

kind regards,

Daniel

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

Interesting. Our dll does export the symbols for QList<double> but it's only a problem if the compiler doesn't know about it ahead of time. Since testobject.o, where the QList<double> member resides, has no idea about our ResolutionList.h the compiler is generating all the template functions for a QList of doubles. Then at link time there are duplicates in our dll and testobject.o. By including our ResolutionList.h, it tells the compiler that these definitions already exist so it doesn't need to generate them again. So with that said, can you please try working around the issue by including ResolutionList.h in the class that uses QList<double>?

0 Kudos
DanielBachmann1
New Contributor

As long as only my own code is involved this will work, but trying to plot some statistics with for example qcustomplot will lead to the same problem...

0 Kudos
LucasDanzinger
Esri Frequent Contributor

One possible other workaround you could use would be to use precompiled headers, and to include ResolutionList.h in pch.h, then include pch.h in all cpp files.

0 Kudos