Hi Roberto,

> Is there any way to get more accurate messages for 'undefined reference'?
> 
> ie:
> 
> I have a testapp called 'hello.prg'.
> 
> At the line #8 I've added the following function call:
> 
> IsNotHere()
> 
> Since the function does not exist, I've got an error message at build:
> 
> .hbmk\win\mingw\hello.o:hello.c:(.data+0x38): undefined reference to 
> `HB_FUN_ISNOTHERE'
> 
> The question is, if is there any way to get the true .prg line number for the 
> line calling the non-existing function.

The message comes from the linker, and the linker has no way to 
know where to look for line number information in original .prg.
It may theoretically have information about .c line numbers if 
compiled with C debug info, but it seems so that linkers don't 
implement such feature and for .prg code it would not help anyway.
Also notice that such message can be result of multiple occurrences 
of ISNOTHERE symbol inside 'hello.o'. So there could be several 
line numbers.

I use very simple 'grep ISNOTHERE *' command to find out occurrences 
of such symbols in question. This works even inside binaries (lib/obj).
This gives exactly the kind of output you're asking for.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to