
Hi Juergen, On Wed, Jun 10, 2009 at 3:15 PM, Juergen Hunold<juergen.hunold@ivembh.de> wrote:
[snip]
But, all these could be not enough for the sophisticated user. Assume, library 'bar' will use library 'foo' as an implementation detail and also will catch all the foo's exceptions. So, bar's maintainer doesn't want to re-export foo's stuff from his library.
This is the gcc case, right ? With msvc, you have to "re-export" the used symbols anyway (by marking them "__dllimport". So why do you want to hide the symbols with gcc ?
I guess, I was not clear and typed too many words ;). Consider the following: foo: [foo::function, foo::Error] bar: [bar::function,] ('[]' - means list of exported symbols) In case, when 'bar' depends on 'foo' and foo::Error is not re-exported: bar: [bar::function]. So, bar only exports bar::function symbol. This is the same for gcc and msvc (I've rechecked msvc's case with dumpbin utility). In case, when foo::Error is re-exported (i.e., foo:Error always have 'default' visibility): bar: [bar::function, foo::Error]. This only relates to gcc.
So why do you want to hide the symbols with gcc ? The reason could be binary compatibility.
Regards