[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Avoiding linking with /home/packaging/X/libxx.so



On Fri, Jun 12, 2015 at 08:11:14AM +0000, lumin wrote:
        hello: hello.o
        	$(CC) -g -o hello hello.o ../lib/libsharedlib.so <--NOTICE

That's not the unusual way to link to a shared library. You should use something like:

	$(CC) -g -o hello hello.o -L../lib/ -lsharedlib

(Although it would probably only work if the library had a SONAME.)

* Andrey Rahmatullin <wrar@debian.org>, 2015-06-12, 14:31:
SONAMEs, not paths, are added to DT_NEEDED.

Technically, you can put (both relative and absolute) paths in DT_NEEDED, not only SONAMEs. The dynamic linker is happy to use such DT_NEEDED entries. It's a terrible idea, though. :-)

--
Jakub Wilk


Reply to: