[Qt-interest] QtPlugin - Multiple Inheritance Problem

Thiago Macieira thiago at kde.org
Mon Jan 18 20:13:23 CET 2010


Em Segunda-feira 18 Janeiro 2010, às 14:34:16, Julian Thomé escreveu:
> I have the following problem. I'm writing an qt-application for creating
> users/groups on ldap. It is possible to write plugins for my application.
> For the communication between the main application and the plugin i use a
> container object (KockpitUser). The plugin receives the container object
> and its attributes should be displayed. The container object inherits from
> multiple classes.
>
[snip]
>  The error ist as follows:
>  
>  ----------------------------------------------------------8< snip
> symbol lookup error ... undefined symbol: _ZNK14KockpitAccount9getDomainEv
> ---------------------------------------------------------->8snap
> 
> If i access KockpitUser-attributes which are not inherited from BaseClasses
> it works.

I don't think your issue is related to plugins or to multiple inheritance. 
It's a simple "I forgot to define a function" error.

$ c++filt _ZNK14KockpitAccount9getDomainEv
KockpitAccount::getDomain() const

Where is that function defined? What .cpp file? Are you sure that .cpp is linked 
into your library?

If you're doing plugins, you must have a library. You can have a library that 
is used by no applications, and you can have zero plugins for your interface. 
But you need a library.

Hint: when building libraries, add to your .pro file:
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

This will make the library linking fail if there are undefined symbols. Why 
isn't this the default? I had made it the default, but then some customers 
complained and I had to revert.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100118/784f994a/attachment.bin 


More information about the Qt-interest-old mailing list