Still problems with gcc 3.4 and visibility

Thiago Macieira thiago.macieira at
Sun Nov 28 01:23:13 GMT 2004

Michael Pyne wrote:
>The error seems to be that the typeinfo for KDEDModule couldn't be found
> in the symbol, but I don't know how that jibes with -fvisibility (or
> --as-needed) since I can't find that symbol in my 3.3 installation
> either.

The C++ extra symbols (typeinfo, virtual table, construction virtual 
tables, typeinfo names) as well as implicit constructors and destructors 
will share the class's visibility.

That means that, for _ZTI10KDEDModule to show up, KDEDModule has to be 
declared as an export.

Also note that those symbols are emitted alongside the so-called principal 
method for the class: the first non-static, non-inline method.

For KDEDModule, it's inside the kdedmodule.moc file.

>I have it working now that I've removed -fvisibility=hidden from my
> kdelibs Makefile (shouldn't that be a configure option?), but even
> adding the KDE_EXPORT macros to the KDEDModule class definition didn't
> help, so now I'm stumped as to how to fix it when -fvisibility=hidden
> is enabled.

That is odd. Are you sure the object was rebuilt? And the library 

Can you see the symbol in the object, with readelf?

  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   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: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list