This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug with library link
- To: alec at relex dot ru
- Subject: Re: Bug with library link
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Tue, 21 Dec 1999 11:42:15 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <016901bf4b90$4245d5b0$a34562c3@alec.relex.ru>
> I think -- this is feature, not bug, but may be...
This is not a bug. The Unix linker worked that way from day one.
> I create my own lib and try to link it with option -l. But when -lmy_lib
> stay before my_soure.o, gcc can't find functions in libmy_lib.a that is
> using in my_source.c.
>
> When -lmy_lib stay after my_source.o -- it links succesfully.
A library is searched for missing symbols. Objects and libraries are
processed from left to right. When no symbol is missing, the library
is not used.
Regards,
Martin