hi , I am having a sort of circular dependencies across libraries., with extern params on both the libs. I am linking with gcc and not ld. I belive gcc internally uses ld for linking. correct me if i am wrong.
the option -( <archive> -) did not work for gcc. Is there any other way for going around this? -Satish On 7/6/07, Eli Zaretskii <[EMAIL PROTECTED]> wrote:
> Date: Thu, 5 Jul 2007 20:54:46 +0530 > From: "Satish S" <[EMAIL PROTECTED]> > > When i try to create an exec linking with multiple libraries, does the > order in which i link matter, if there are dependencies across the libs? It depends on the linker, but with most of them, the order does matter. > eg: > > TEST_EXE: > $(LN) -o TEST_EXE -l $(LIB1) $(LIB2) $(LIB3) The Make variable for the linker is $(LD), not $(LN). > Are the libs picked up from right to left or are they all extracted before > being linked? With one-pass linkers, such as GNU ld (and the other Unix linkers), they are scanned left to right. GNU ld can be optionally forced to repeatedly rescan a group of libraries until all symbols are resolved (see the -( and -) options).
-- Those who cannot remember the past are condemned to repeat it - George Santayana
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
