This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]