help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to trace a link error back to the responsible line of source code.


From: Steve Mading
Subject: How to trace a link error back to the responsible line of source code.
Date: Thu, 27 May 2004 05:14:45 +0000 (UTC)
User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (Linux/2.6.4 (i686))

Quick summary:  Is there a way to make G++ and GLD trace
back line number references to let me know where a particular
function call is being attempted in the original source files?
I keep getting an error during linking that claims I'm
trying to call a particular constructor that doesn't exist
(other versions of that constructor exist, but not with this
particular set of parameters).  I can't figure out where
that nonexistent constructor is allegedly being called from.
I tried finding it with clever uses of grep and came up dry,
then I tried finding it with a 'dumb' text search on all uses
of that class name, scanning each line by eye to try to find
where I'm allegedly making this call from.  But I still can't
find it and I've searched every matching line that exists in
my main code and my libraries.

It seems to me like the information to be available to match
the call attempt back to the source code line numbers that
attempt it.  After all, such information is included for use
by the debugger when I use a '-g' option, so it should somehow
be there during the linking stage, if only I could get at it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]