[Qt-interest] Qt mocks issue multiple definition of

Alex Ivasyuv industral at gmail.com
Sun Oct 31 21:31:52 CET 2010


On 10/31/2010 10:09 PM, Pavel Koshevoy wrote:
> On 10/31/2010 1:46 PM, Alex Ivasyuv wrote:
>> Hi,
>>
>> I found an ?issue? with Qt mocks.
>> Please checkout this simple code
>> http://qttestissue.googlecode.com/svn/trunk/
>>
>> If you have the same classes names, Qt mocks create the same object
>> names for them, and as result fails with the following error: "multiple
>> definition of"
> Actually, your classes are named differently
> A/MyClass.* implements MyClass2
> B/MyClass.* implements MyClass
>
> The class name does not have to match the file name (as in your case
> with MyClass2), but it is a good practice that a file name matches the
> name of the class -- rename A/MyClass.* to A/MyClass2.*

Yes, you right. I just played around...
Done, but still the same error....

> Other than that, this seems to be a qmake bug, it generated a Makefile
> that links the same object file twice.
>
>       Pavel.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101031/d6752b8c/attachment.html 


More information about the Qt-interest-old mailing list