December 23, 2011
On 12/22/11 19:12, GrahamC wrote:
> If I import std.regex in a program, compiling with gdc gives many unresolved symbols, e.g for:
>   immutable(std.internal.uni.CodepointSet) std.internal.uni_tab.unicodeLu

Hmm, i needed a demangling filter today, and the program below compiles and runs here just fine, using current hg gdc, on x86 (32bit) linux.

Is importing std.regex enough to trigger the build failure?

----
import std.stdio;
import std.regex;
import std.demangle;

immutable dsym_re = "_D([0-9]*[a-zA-Z_]+)+";

void main() {
   //enum re = ctRegex!(dsym_re, "g");       // XXX doesn't build.
   auto re = regex(dsym_re, "g");

   auto dsym(Captures!(char[], uint) cap) {  // XXX why uint?
      return demangle(cap.hit.idup);         // XXX really needs idup?
   }
   foreach (line; stdin.byLine())
      writeln(replace!(dsym)(line, re));
}
----
December 27, 2011
>> If I import std.regex in a program, compiling with gdc gives many unresolved symbols, e.g for:
>>  immutable(std.internal.uni.CodepointSet) std.internal.uni_tab.unicodeLu
>>  ref @safe std.internal.uni.CodepointSet std.internal.uni.CodepointSet.add(const(std.internal.uni.CodepointSet))
>> plus many others.

I did a new download and build today and my problem is no longer happening. Maybe it was my error.

Thanks for your replies.