New linker error with xml2

ollie ollie at home.net
Wed Aug 28 13:05:14 PDT 2013


I have been seeing a new linker error while building xml2.

  OPTLINK (R) for Win32  Release 8.00.12
  Copyright (C) Digital Mars 1989-2010  All rights reserved.
  http://www.digitalmars.com/ctg/optlink.html
  sxmltest.obj(sxmltest)
   Error 42: Symbol Undefined
   _D3alt7zstring22__T9KeyValRecTAyaTAyaZ9KeyValRec
   8opEqualsMxFKxS3alt7zstring22__T9KeyValRecTAyaTAyaZ9KeyValRecZb

   (demangled for your convenience)
   const(bool function(ref const(alt.zstring.KeyValRec!(immutable(char)[], immutable(char)[]).KeyValRec))) alt.zstring.KeyValRec!(immutable(char)[], immutable(char)[]).KeyValRec.opEquals

The error starts with commit:
  
  commit 751353c8217596726ab219b7d3a690e8950e409e
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   Sat Aug 24 15:07:18 2013 +0900

To compile xml2, I have made the following changes:

  change struct Array member toConstArray from @safe to @trusted because
  pointers cannot be transformed into arrays in safe code.

  changed several occurences of 'delete this;' to 'this.destroy();'

  changed auto doc = new Document(TagData("catalog");
  to      auto td = TagData("catalog");
          auto doc = new Document(td);
  because of an lvalue problem. (should td be allocated on heap instead?)

  changed some readln to return to a string instead of passing a string.

I am using Win32 with Walter's snn.lib with HeapAlloc calls and obviously
git head for dmd etal. Anyone have any ideas why dmd would generate that
template function for test\sxml.d after that commit but not before?


More information about the Digitalmars-d mailing list