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: a question about -l option


Thank you for the reply.

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?
If we want to link librt.so.7 the following is OK?
-l:librt.so.7

On Sun, Jun 24, 2012 at 9:02 PM, Ian Lance Taylor <iant@google.com> wrote:
> ali hagigat <hagigatali@gmail.com> writes:
>
>> My question is about the link option, -l. Like, -lrt, ?We know that
>> librt.a (or librt.so) is the actual file which is searched for. But i
>> had a an experience and i saw that if there is no librt.a, other "rt"
>> combinations are searched too, like , librtdm.a.
>
> That is not correct, at least not on GNU/Linux or Unix systems. ?If you
> use -lrt, the linker will search for librt.a and librt.so. ?It will not
> search for librtdm.a.
>
> Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]