> 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). _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
