Re: order of directories passed with -L

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

 



Vincent Torri <vtorri@xxxxxxxxxxxx> 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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux