More symbol export stuff -- GCC Visibility patch

David Faure faure at kde.org
Mon Jul 19 00:10:07 CEST 2004


On Sunday 18 July 2004 22:59, Karl Vogel wrote:
> While playing with this symbol stuff.. I noticed that other libs were also 
> exporting way more than needed.
> 
> For instance... libkateinterfaces has exports for all the private methods & 
> private slots of all the classes it implements. 
> 
> I was able to reduce the symbols by manually adding an attribute to the 
> private parts (source parts.. not the other kind :-) ... ie.
> 
> #define HIDE  __attribute__((visibility ("hidden"))
> 
> and then..
> 
>   private:
> 	void methodX() HIDE;

It's already available in KDE, called KDE_NO_EXPORT, see kdelibs/kdecore/kdemacros.h

But I guess it's far from used enough at the moment.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-optimize mailing list