[FFmpeg-devel] Why 'You can only build one library type at once on MinGW'?
Sat May 12 03:16:47 CEST 2007
On Sat, May 12, 2007 at 03:13:00AM +0300, Uoti Urpala wrote:
> On Sat, 2007-05-12 at 01:15 +0200, Michael Niedermayer wrote:
> > and to get this totally off topic disscussion a little back to ffmpeg,
> > i wish i could get gcc to make all symbols which arent in a specific set
> > of headers "library-wide static" anyone knows a simple and clean trick
> > to do that?
> "-fvisibility=hidden" makes all symbol definitions generated hidden by
> default, so that they do not appear in the external API. You can
> explicitly mark some as public by using
> '__attribute__((visibility("default")))', or using a #pragma to change
> the default for some part of a file.
> That takes care of the visibility of generated symbols and thus of the
> external API part. However it's not enough for the code efficiency part.
> Because the code will include external headers too -fvisibility can not
> change the default for extern symbol _declarations_ (otherwise symbols
> declared within say "#include <stdlib.h>" would be assumed to be in the
> same library). So to make the code access symbols defined in other files
> of the same library more efficiently you need to mark the visibility in
> internal headers too to distinguish them from headers declaring symbols
> that will be in external libraries. Again you can do this by either
> using a per-symbol attribute or using a #pragma (the #pragma changes the
> default for both definitions and extern declarations).
so simply adding a #pragma at the begin and end of all internal headers
would make them hidden from outside and avoid the silly double indirection
when they are accessed?
if so, patch welcome
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel