If I get a warning that gives the output object file with a number (eg, a.out:3415) what does this number refer to?
Printable View
If I get a warning that gives the output object file with a number (eg, a.out:3415) what does this number refer to?
The line number.
Sorry, I misread. The a.out file? It's still probably a location, but of course probably not a line number. Can you give more (as in any) context?
The only thing that I can think of is that is must have been a linker error/warning, i.e.
Otherwise, for a compiler error, you would have gotten a reference to a source file, not an object file. But even then the source file is mentioned, and the name of the output executable is not.Code:$ cat undef.c
#include <stdio.h>
void function();
int main() {
function();
return 0;
}
$ gcc undef.c
/tmp/ccea6Yiz.o: In function `main':
undef.c:(.text+0xa): undefined reference to `function'
collect2: ld returned 1 exit status
$
Who knows.