> > 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.
> 
> Thanks for the explanation.
> 
> Assuming that the '.c' reported in the message has always the same basename 
> of the '.prg' containing the undefined reference and (as you suggest) 
> searching it for such reference to obtain the involved line(s), could give to 
> the user a more accurate and 'elegant' message about the problem.
> 
> Could be very useful if such feature be added via an optional switch to hbmk2.

This doesn't look doable to me, or at least such little 
more elegant output is very pricey. First of all, mingw 
is just one of the dozen compilers hbmk2 currently supports. 
hbmk2 would need error output parsers for each of them 
(think about multiple message format across different 
compiler versions to make it even more difficult to maintain). 
Then it would have to know a way to determine original 
.prg source name based on object name. This is sometimes 
easy to guess (it's guessing nevertheless), but not 
easily doable in a generic way (f.e. .clp files, or 
objects included in libs, which have the same name as 
.prg files in actual project, multiple phase builds 
using -hbcmp and friends, .c source objects, objects in 
libs, inline .c). Suppose we have the .prg source name, 
then comes the impossible part: Finding the occurrences of 
symbol in source code. Granted, hbmk2 could do a simple 
string search (if managed to reach this point), but this 
isn't too much added value compared to a simple 'grep' 
issued by user. To do it properly though, it would need 
serious compiler/pp support.

So overall I see not much chance this could make into 
hbmk2, or any similar tool.

Of course if someone has better ideas how to solve 
this problem, I'm interested to hear it.

Brgds,
Viktor

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

Reply via email to