Unresolved symbols when program imports std.regex

Artur Skawina art.08.09 at gmail.com
Fri Dec 23 11:30:58 PST 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));
}
----


More information about the D.gnu mailing list