Bernhard R. Link writes ("Re: Should .a library contains non-reallocatable code?"): > Ian Jackson <ijack...@chiark.greenend.org.uk> [150224 15:50]: > > + gcc -Wall main.c -L. -lbar1 -lbar2 > > You forgot to change that line as I said to change it.
Ah yes, sorry. I can reproduce the problem that way. It works if I say gcc -Wall main.c -L. -lbar1 -lbar2 -lfoo but not the other way round. > main.c now uses libfoo1 and libbar2, so in my example I build against > those. Now you only need a bit of bad luck to use -lbar2 -lfoo1 in > that order and you get the problem. Right. I think that the right answer to this, in these cases, is either to use an explicit symbol export file or to adjust the link command lines. Doing it the other way (not including libfoo.a in libbar.so) doesn't work properly at all for the reasons I've explained. Ian. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/21740.47632.625206.231...@chiark.greenend.org.uk