Re: -Ldir search order

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

 



"Duran, Richard" <RDuran@xxxxxxxxxxxxxxxxxxx> writes:

> The documentation states that directories identified with "-Idir"
> are to be searched before system include directories. Are
> directories identifed with "-Ldir" searched before system lib
> directories? The documentation makes no statement either way.

Yes, directories specified with -L are searched before system library
directories.

The compiler handles the -I option directly.  The -L option is simply
passed to the linker, which is not part of the compiler.  So in
principle the behaviour of the -L option is determined by the linker.
In practice all linkers search -L directories before system
directories.

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