help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order of linking libraries


From: Kristof Provost
Subject: Re: Order of linking libraries
Date: Wed, 11 Jul 2007 21:29:38 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On 2007-07-11 18:33:35 (+0530), Satish S <address@hidden> 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 option -( <archive> -) did not work for gcc. Is there any other way for
> going around this?
> 
> -Satish
> 

Gcc is a driver program. It will figure out which program to call to
compile/link the file. I believe it uses the file extension (.c, .cpp,
...) to make it's decision.

It is possible to pass options to ld, even though you call gcc. You need
-Wl,<linker option> to pass commands directly to the linker.

You can use the -v option to see which commands the driver issues.

Kristof




reply via email to

[Prev in Thread] Current Thread [Next in Thread]