[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25747] New: Give more helpful diagnostic when users try to link
From: |
jwakely.gcc at gmail dot com |
Subject: |
[Bug ld/25747] New: Give more helpful diagnostic when users try to link to foo.a with -lfoo |
Date: |
Mon, 30 Mar 2020 08:37:57 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25747
Bug ID: 25747
Summary: Give more helpful diagnostic when users try to link to
foo.a with -lfoo
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: jwakely.gcc at gmail dot com
Target Milestone: ---
It seems pretty common for beginners to name an archive foo.a and then expect
-lfoo to find it.
If a link fails to find anything matching a -lfoo option, it might be useful to
search again with a different set of filename patterns. If foo.a or foo.so is
found, tell the user that they either need to rename the library or use -l:
i.e. instead of:
$ gcc src.c -L/path/to -lfoo
/usr/bin/ld: cannot find -lfoo
collect2: error: ld returned 1 exit status
print something like:
/usr/bin/ld: cannot find -lfoo
note: to link with /path/to/foo.a use -l:foo.a or rename it to libfoo.a
collect2: error: ld returned 1 exit status
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/25747] New: Give more helpful diagnostic when users try to link to foo.a with -lfoo,
jwakely.gcc at gmail dot com <=