On 07/02/2024 7:27 PM, Carl Sturtivant wrote:
Need help working around a linkage problem.
```d
import std.uni, std.conv, std.stdio, std.format;

void main() {
     //auto c1 = unicode.InBasic_latin;
     auto c1 = CodepointSet('a','z'+1);
     writeln(c1.to!string);
     writeln(format("%d", c1));
     writeln(format("%#x", c1));
     writeln(format("%#X", c1));
     writefln("%s", c1);
}
```
doesn't link, but does link with the commented out CodepointSet instead. Combines code from these examples at the following URLs.
https://dlang.org/phobos/std_uni.html#InversionList
https://dlang.org/phobos/std_uni.html#.InversionList.toString
```
$ dmd --version
DMD64 D Compiler v2.107.0
Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved written by Walter Bright
$ dmd cset2.d
/usr/bin/ld: cset2.o: in function `_D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv':
cset2.d:(.text._D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv[_D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv]+0x19):
 undefined reference to 
`_D4core9exception__T15__switch_errorTZQsFNaNbNiNeAyamZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
```

Use ``-allinst``, that is a template emission bug.
  • std.uni Codepoin... Carl Sturtivant via Digitalmars-d-learn
    • Re: std.uni... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: std... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: std... Carl Sturtivant via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... H. S. Teoh via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Carl Sturtivant via Digitalmars-d-learn
            • ... H. S. Teoh via Digitalmars-d-learn
            • ... Danilo via Digitalmars-d-learn
              • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
              • ... Paul Backus via Digitalmars-d-learn

Reply via email to