a question about -l option

Ian Lance Taylor iant@google.com
Mon Jun 25 14:46:00 GMT 2012


ali hagigat <hagigatali@gmail.com> writes:

> For -lrt besides librt.a and librt.so other files are searched too,
> like librt.so.1?  If there is librt.so and lirt.so.1 together which
> one is selected?

The linker will not find librt.so.1 given -lrt.

> If we want to link librt.so.7 the following is OK?
> -l:librt.so.7

Sure.

Ian



More information about the Gcc-help mailing list