This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
a question about -l option
- From: ali hagigat <hagigatali at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Cc: binutils at sourceware dot org
- Date: Sun, 24 Jun 2012 16:31:31 +0430
- Subject: a question about -l option
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.
I have a suggestion. please mention this fact in the GCC or LD manual.
I have a question now. If I have several files like librtam.a,
librtbm.a and librtcm.a and then i use -lrt, which one will be linked?
(Or all of them?)
/root> gcc --version
gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/root> rpm -qi binutils
Name : binutils Relocations: (not relocatable)
Version : 2.21.53.0.2 Vendor: Fedora Project
Release : 1.fc17 Build Date: Mon 08 Aug
2011 20:53:40 IRDT
Install Date: Wed 05 Oct 2011 16:05:39 IRST Build Host:
x86-05.phx2.fedoraproject.org
Group : Development/Tools Source RPM:
binutils-2.21.53.0.2-1.fc17.src.rpm
Size : 14303451 License: GPLv3+
Signature : (none)
Packager : Fedora Project
URL : http://sources.redhat.com/binutils
Summary : A GNU collection of binary utilities