Order of linking libraries

2007-07-06 Thread Satish S
hi, 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? eg: TEST_EXE: $(LN) -o TEST_EXE -l $(LIB1) $(LIB2) $(LIB3) = Are the libs picked up from right to left or are they all extracted b

Re: Order of linking libraries

2007-07-06 Thread Eli Zaretskii
> 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 mat

Re: Order of linking libraries

2007-07-11 Thread Satish S
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 -( -) did not work for gcc. Is there any other way for going around this?

Re: Order of linking libraries

2007-07-11 Thread Eli Zaretskii
> Date: Wed, 11 Jul 2007 18:33:35 +0530 > From: "Satish S" <[EMAIL PROTECTED]> > > 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. > > t

Re: Order of linking libraries

2007-07-11 Thread Kristof Provost
On 2007-07-11 18:33:35 (+0530), Satish S <[EMAIL PROTECTED]> wrote: > 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 o

Re: Order of linking libraries

2007-07-11 Thread Philip Guenther
On 7/11/07, Satish S <[EMAIL PROTECTED]> wrote: 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. If library A requires library B and librar

Re: Order of linking libraries

2007-07-12 Thread Paul Smith
The first thing to say is that this has nothing whatever to do with GNU make. For help with linking issues you should contact a group related to your compiler/linker toolchain; in this case GCC. Second, if you don't want to mess with special linker flags you can use the tried and true method of l