Hi John,
John (Eljay) Love-Jensen wrote:
dir1/*.o dir2/libx.a -> dir3/liby.so
The point to -static is to prefer libx.a rather than libx.so when you ask
for -lx.
Well, the linking itself was now fine, but I've got new problems in parts
of the software that do not use parts of the library. When I link the .o
files directly into the shared object, then I have no problem, the software
runs fine then.
I've built the lib using
$(AR) rcs libx.a obj1.o obj2.o
where $(AR) put out "ar"
HTH,
--Eljay
As far as I understood it these two commands should result in the same file:
(with the command above)
$(LD) (shared object options) libshared.so libx.a obj5.o obj6.o
and
$(LD) (shared object options) libshared.so obj1.o obj2.o obj5.o obj6.o
right or not? If not what must be done to make these two lines behaviour
equivalent? or must I take -static -lx?
Best regards,
Erik