More symbol export stuff -- GCC Visibility patch

Karl Vogel <[email protected]>
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>
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;


This worked.. but it seemed strange that there was no better way to do this.. 
so I put the question to gcc-devel:

  http://thread.gmane.org/gmane.comp.gcc.devel/51574


Esp. the answer of Giovanni Bajo was interesting, pointing me to this webpage:

GCC Symbol Visibility Patch    	
http://www.nedprod.com/programs/gccvisibility.html


Reading through the gcc PR issues.. I noticed a familiar name.. so guess some 
KDE developers are already onto this.

Has the dllexport/dlllocal macro as shown on the gcc visibility patch page 
been considered yet?! (ie. for KDE4 coding style)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.