This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to make an application look somewhere other than /lib for ld-linux.so.2
- From: Haren Visavadia <themis_hv at yahoo dot co dot uk>
- To: Mark Cuss <mcuss at cdlsystems dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 26 Jul 2005 20:29:44 +0100 (BST)
- Subject: Re: How to make an application look somewhere other than /lib for ld-linux.so.2
--- Mark Cuss wrote:
>
> For #1, if I build with --static, then no libraries
> can be linked in
> dynamically at runtime... I need to do this for
> some custom Qt libraries
> and plugins, so I can't just make a completely
> static executable. This is
> unfortunate - the resulting binaries would be big,
> but they'd work on any
> distro.
This is possible by using something like
-Wl,-Bdynamic, (insert list of libraries to be
dynamically linked),-Bstatic
For example, if you want to dynamically link against
Qt library and glibc and rest of it being static, you
can use -Wl,-Bdynamic,-lqt-mt,-lc,-Bstatic
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com