On Fri, Sep 20, 2013 at 10:39 PM, Vittorio Giovara <[email protected]> wrote: > On Wednesday, September 18, 2013, Andrew Kelley wrote: >> >> against libav statically and the use of -Bsymbolic >> --- >> doc/platform.texi | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/doc/platform.texi b/doc/platform.texi >> index 2a7dd45..e4b0c7e 100644 >> --- a/doc/platform.texi >> +++ b/doc/platform.texi >> @@ -24,6 +24,16 @@ If not, then you should install a different compiler >> that has no >> hard-coded path to gas. In the worst case pass @code{--disable-asm} >> to configure. >> >> +@section Compiling a shared library statically against libav > > > I'd be more generic and use "Advanced linking configuration" there > >> + >> +If you are compiling a .so and you want to include libav statically >> +inside the shared library, in addition to configuring with --enable-pic, >> +you will need to add this to your linker command: > > > To me it is unclear where -Wl,-Bsymbolic and --enable-pic refer to libav or > to the .so and the term 'include' should refer to headers only. > I assume --enable-pic refers to libav configuration while -Wl,-Bsymbolic to > the .so link line, so I propose this wording: > > If you are compiling your own shared library (.so) and you want to link a > static library against it, you need to configure libav with --enable-pic and > add the following to your shared library linking command: > >> >> + >> +@example >> +-Wl,-Bsymbolic >> +@end example >> + > > > Open question, shouldn't be -Wl,-Bsymbolic-functions there too? > > Vittorio > >> >> @section BSD >> >> BSD make will not build Libav, you need to install and use GNU Make
By the way, are you sure this is enough? I have tried this exact same configuration and still got some undefined link errors on my application. Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
