[Libav-user] reduce dll size

YIRAN LI mrfun.china at gmail.com
Wed Mar 26 09:04:43 CET 2014


Yes, there definitely is some amount of duplication with multiple
DLLs. You can easily find the amount of overhead, in a supported way.
Build your project with static version of ffmpeg libraries, and
compare the size of your binary with the size of binary you have now
(which is built with libavcodec.dll, libavformat.dll, etc.). For the
latter, sum up all the DLLs that you need to deploy.

>>> Thanks for all the response friends, you're really kind to me.

Alex, our program uses dll and won't statically link with ffmpeg .a libs.
So the question simplified to, in each dll, is there any duplicate code,
 (instead of if statically link my program with .a can save me space
because
only those needed will be bundled)

-lm is an example, if only static library found, any dll uses math function
will
include corresponding .o. But I think Michael is correct in his last mail,
it's not likely
that libm dependency cause so much duplication.

I'm now using -Wl, -Map to dump the map file (configure with -Wl -Map). I
only
build shared libraries and no executables. But I only get one map in root
folder, instead of
separate map files in component folder. With different components
enabled/disabled
the content of the map file does change. So I assume this map file contains
all the info of
libraries built. Is it correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140326/3132619f/attachment.html>


More information about the Libav-user mailing list