This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Ldir search order


"Duran, Richard" <RDuran@dallasairmotive.com> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]