[Ffmpeg-devel] [PATCH] [Visibility] libpostproc public functions

Diego 'Flameeyes' Pettenò flameeyes
Tue Sep 19 03:25:24 CEST 2006

On Tuesday 19 September 2006 02:24, Michael Niedermayer wrote:
> why not protected?
Okay now i know why not protected :)
If I declare, say, av_log() as protected, it will work fine in libavutils, but 
when it's used by libavcodec, I get this:

bitstream.o: relocation R_X86_64_PC32 against `av_log' can not be used when 
making a shared object; recompile with -fPIC
final link failed: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libavcodec.so.51] Error 1

because it tries to use an av_log() internal to libavcodec.

What we'd need in this situation is something that changes per-library, so 
that we get something like this:

#if __GNUC__ >= 4
#  define EXPORTED __attribute__((visibility("protected")))
# else
#  define EXPORTED __attribute__((visibility("default")))
# endif
# define EXPORTED

Diego "Flameeyes" Petten? - http://farragut.flameeyes.is-a-geek.org/
Gentoo/Alt lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060919/9f0c1dfe/attachment.pgp>

More information about the ffmpeg-devel mailing list