[llvm-bugs] [Bug 42407] New: MinGW: Undefined reference message is missing source file and line
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 26 06:10:05 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42407
Bug ID: 42407
Summary: MinGW: Undefined reference message is missing source
file and line
Product: lld
Version: unspecified
Hardware: PC
OS: Windows XP
Status: NEW
Severity: enhancement
Priority: P
Component: COFF
Assignee: unassignedbugs at nondot.org
Reporter: orgads at gmail.com
CC: llvm-bugs at lists.llvm.org
When compiling with debugging symbols, GNU ld reports the file and line of the
reference. lld is missing this feature on MinGW. It works correctly on Linux.
$ cat test.cpp
void func();
int main(int argc, char **argv)
{
func();
return 0;
}
$ g++ -g test.cpp
C:\Users\orgads\AppData\Local\Temp\cci25Lpz.o: In function `main':
F:\Temp/test.cpp:5: undefined reference to `func()'
collect2.exe: error: ld returned 1 exit status
$ g++ -g -fuse-ld=lld test.cpp
lld-link: error: undefined symbol: __Z4funcv
>>> referenced by C:\Users\orgads\AppData\Local\Temp\cccApKoz.o:(.text)
collect2.exe: error: ld returned 1 exit status
On linux:
$ g++ -g -fuse-ld=lld test.cpp
ld.lld: error: undefined symbol: func()
>>> referenced by test.cpp:5
>>> /tmp/ccg8pzRr.o:(main)
collect2: error: ld returned 1 exit status
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190626/0c525735/attachment-0001.html>
More information about the llvm-bugs
mailing list