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