On segunda-feira, 4 de fevereiro de 2013 10.49.59, Franz Hirschbeck wrote: > 1>file2.obj : error LNK2005: "public: __cdecl `public: __cdecl > QList<class QString>::QList<class QString>(class QList<class QString> > const &)'::`5'::Cleanup::Cleanup(struct QListData::Data *)" > (??0Cleanup@?4???0?$QList@VQString@@@@QEAA@AEBV1@@Z@QEAA@PEAUData@QListData@ > @@Z) already defined in file1.obj
What's that "5" over there? > The error is located in <QtCore/QList>. > > The "Cleanup" struct is defined, declared and instantiated within the > templated constructor of the class QList. If it is used in 2 independent > .cpp files with the same template parameter than it should be created in > both objects. But the linker can see that they are identical. > When the compiler was called with the /clr flag this results in the > linker error afterwards. Conclusion: compiler / linker bug. > I tracked this down to a very simple example which is attached. > > I am not sure if this is a bug from the compiler, a limitation of clr or > if the Qt code itself is not valid. To me the code looks correct and I > don't know of a limitation of CLR in that case. Either way, it's not Qt's fault. If the compiler can't compile completely valid C++ code and link it, then you should report it to the vendor. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest