public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* order of directories passed with -L
@ 2007-03-08  9:57 Vincent Torri
  2007-03-08 17:26 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Torri @ 2007-03-08  9:57 UTC (permalink / raw)
  To: gcc-help


Hey,

Suppose that I pass those arguments to gcc :

-Lpath1 -llib1 -Lpath2 -llib2 -L path3 -llib3

In which directory(ies) will gcc search lib1, lib2 and lib3 ?

(gcc man page didn't help me)

thank you

Vincent Torri

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: order of directories passed with -L
  2007-03-08  9:57 order of directories passed with -L Vincent Torri
@ 2007-03-08 17:26 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-03-08 17:26 UTC (permalink / raw)
  To: Vincent Torri; +Cc: gcc-help

Vincent Torri <vtorri@univ-evry.fr> writes:

> Suppose that I pass those arguments to gcc :
> 
> -Lpath1 -llib1 -Lpath2 -llib2 -L path3 -llib3
> 
> In which directory(ies) will gcc search lib1, lib2 and lib3 ?
> 
> (gcc man page didn't help me)

The -L and -l options are simply passed to the linker.  So, look at
the linker documentation.

The answer here is that all the -L options are gathered together.  The
linker will search for the -l options in all of the -L options, even
the ones that follow the -l option.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-08 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-08  9:57 order of directories passed with -L Vincent Torri
2007-03-08 17:26 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).