[Ilugc] Repost|To build a product using only static dependency libraries
- From: midhun@xxxxxxx (Midhun Kumar Allu)
- Date: Mon Jan 24 13:47:09 2005
On Mon, 24 Jan 2005, Senthil Prabu.S wrote:
Hello List,
I am wondering whether is it possible to build a product using only
the static version of
it's dependency library by default. Normally when we compile any product, the
compiler looks
for the shared version of it's dependency library. And when the shared
version is not present,
it take the static version of the dependency product ( I use to fix this, by
editing the configure
scipt sometime manually).
My question is, Will it possible to tell the compiler to take only
static dependency library by
default through some "flag values", when both static and shared version of
the dependency libaries
are present. Is any better way out there.
If you would like to override the present libraries with the ones you have
written, place the path in /etc/ld.so.preload and that should take a
precedence over others which are in /etc/ld.so.conf
For more details look at :
http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html
Also, I knew that using shared dependent library will occupy less
memory. But is there any
other valid reason to go with shared libraries. Can anyone in this list give
me a detailed answer
on this issue.
You should try a shared library when the program is likely to be used by
more than one user on the same machine. That way it will be more efficient
for the reasons known to you. More acceptance of your program. I guess
that is a good incentive enough.
Midhun.
______________________________________________________________________________
Midhun Kumar Allu
Masters Computer Engineering
URL :
http://midhun.allubrothers.com
_______________________________________________________________________________
Other related posts: