[Issue 13167] Link errors with std.variant

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 18 21:23:49 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13167

growlercab at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |growlercab at gmail.com

--- Comment #1 from growlercab at gmail.com ---
I have the same problem with this example:

---
import std.variant;
void main()
{
    Variant a = true;

}
---

/tmp/.rdmd-1000/rdmd-hack.d-C187E56C4E00B02558F23ECBE6067626/objs/hack.o: In
function
`_D3std7variant18__T8VariantNVmi32Z8VariantN14__T7handlerTbZ7handlerFNeE3std7variant18__T8VariantNVmi32Z8VariantN4OpIDPG32hPvZl':
hack.d:(.text._D3std7variant18__T8VariantNVmi32Z8VariantN14__T7handlerTbZ7handlerFNeE3std7variant18__T8VariantNVmi32Z8VariantN4OpIDPG32hPvZl+0x30d):
undefined reference to `_D3std4conv11__T2toTAyaZ9__T2toTbZ2toFbZAya'
collect2: error: ld returned 1 exit status
--- errorlevel 1


Demangled

/tmp/.rdmd-1000/rdmd-hack.d-C187E56C4E00B02558F23ECBE6067626/objs/hack.o: In
function `@trusted long
std.variant.VariantN!(32uL).VariantN.handler!(bool).handler(std.variant.VariantN!(32uL).VariantN.OpID,
ubyte[32]*, void*)':
hack.d:(.text. at trusted long
std.variant.VariantN!(32uL).VariantN.handler!(bool).handler(std.variant.VariantN!(32uL).VariantN.OpID,
ubyte[32]*, void*)+0x30d): undefined reference to `immutable(char)[]
std.conv.to!(immutable(char)[]).to!(bool).to(bool)'
collect2: error: ld returned 1 exit status
--- errorlevel 1

--


More information about the Digitalmars-d-bugs mailing list