Dparser link error

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue Mar 20 15:44:16 PDT 2007


Knud Soerensen wrote:
> Hi 
> 
> I am trying to link the mars.d program which come with Dparser
> and i get the following errors.
> 
[snip]: undefined reference to `_D22TypeInfo_B10AaAaAaAaAa6__initZ'
> collect2: ld returned 1 exit status
> --- errorlevel 1
> 
> Does anybody know what the problem is ??

That's the TypeInfo for a tuple(char[],char[],char[],char[],char[]), 
probably from:

>             .errorLoc(loc, "%s at %s conflicts with %s at %s", s1.toPrettyChars(), s1.locToChars(), s2.toPrettyChars(), s2.locToChars());

Is that function by any chance declared as something like "void 
errorLoc(Loc, ...)"?
(IIRC TypeInfo for tuples is used to pass varargs, and this is the only 
function call with >= 5 parameters)

As to why that TypeInfo doesn't get emitted, that may be a long story.
What is your compiler command line? (including compiler please)
Do you use -c to compile files one-by-one and then link or do you just 
pass all files at the same time? Whichever it is, does this error 
disappear if you switch?


More information about the Digitalmars-d-learn mailing list