What is the difference between *.a and *.so files. I know that *.so is a shared library file and *.a is a tar'ed version(Am i not correct??..Please clarify) What advantage one get if we use *.a file instead of *.so file.? Where can i get more details about this?
.so files are shared object libraries (dynamic linking) .a files are static librarries
The advantage of .so files is, that they can be used by many applications. The advantage of .a files is, that everything is linked into your application. Thus you have no external dependencies.
A potential disadvantage of .so files that is sometimes relevant for low resource (e.g. embedded) systems is that they need to provide all bells and whistles that any conceivable user of the library might ever require. So, for example, glibc, which just about any program needs, has grown quite big and only a very small fraction of user programs (if any) actually uses all the functionality contained.
If you look at the the *combined* footprints of glibc and a hello-world-style application, you may end up using considerably less resources with a statically linked program. Of course, this advantage vanishes as soon as you need more than -say- 20 user programs, but for e.g. busybox-based embedded systems, static linking can result in significantly lower resource requirements.
Rob
--
Robert Kaiser email: rkaiser AT sysgo DOT com
SYSGO AG http://www.elinos.com
Klein-Winternheim / Germany http://www.sysgo.com
I seem to recall that there is (was?) such a tool, but I've certainly never seen it at work. Would be nice if someone who knows more could share his info with us.
Anyone ?
Rob
--
Robert Kaiser email: rkaiser AT sysgo DOT com
SYSGO AG http://www.elinos.com
Klein-Winternheim / Germany http://www.sysgo.com
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.