[FFmpeg-user] How to enable external libraries but do not depend on them
tanersener at gmail.com
Sun Dec 23 22:17:19 EET 2018
On Sun, 23 Dec 2018 at 18:00, Moritz Barsnick <barsnick at gmx.net> wrote:
> You can't with the normal tool chain, but you can use some "tricks" to
> combine them, assuming you know all the dependencies:
> As it mentions, your resulting library will contain *everything* from
> the dependencies. And the ffmpeg build process won't help you, *but*
> the pkg-config files can tell you which libraries are the dependencies
> of each ffmpeg library.
> You could even omit e.g. libc, assuming it is always available on the
In fact, the first thing I tried was extracting all static libraries and
packing them again in a single static library. But I failed to link output
library in Xcode, I received too many undefined symbol errors. I use link
time optimization & bitcode embedding flags for ffmpeg compilation. Maybe
this extract & re-pack process broke them. I'm not sure. I still didn't
give up but it would be great if I had another option.
> Only when linking a *binary* will the linker throw away the unneeded
> symbols. I don't know of an easy way to do this for your bundled
> library (though there may be a way).
> Do you really plan to distibute such bundled libraries - not binaries?
> With binaries (i.e. executables), no such problem exists.
Yes, I have a wrapper library around it. It works well.
More information about the ffmpeg-user