Cannot make sense of link error
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 9 08:41:48 PDT 2017
When I clone master of
https://github.com/nordlow/phobos-next.git
and test it with DMD 2.076 as
/usr/bin/dub test --compiler=dmd
linking fails as
Generating test runner configuration 'phobos-next-test-library'
for 'library' (library).
Performing "unittest" build using dmd for x86_64.
phobos-next 0.2.0+commit.78.gb394bc11: building configuration
"phobos-next-test-library"...
Linking...
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.o:src/zio.d:function pure @safe immutable(char)[] std.conv.textImpl!(immutable(char)[], immutable(char)[], char).textImpl(immutable(char)[], char): error: undefined reference to 'pure nothrow @nogc @safe immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutable(char)[]).to(return immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.o:src/zio.d:function pure nothrow @safe immutable(char)[] std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[]).textImpl(immutable(char)[], immutable(char)[], immutable(char)[]): error: undefined reference to 'pure nothrow @nogc @safe immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutable(char)[]).to(return immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.o:src/zio.d:function pure nothrow @safe immutable(char)[] std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[]).textImpl(immutable(char)[], immutable(char)[], immutable(char)[]): error: undefined reference to 'pure nothrow @nogc @safe immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutable(char)[]).to(return immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.o:src/zio.d:function pure nothrow @safe immutable(char)[] std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[]).textImpl(immutable(char)[], immutable(char)[], immutable(char)[]): error: undefined reference to 'pure nothrow @nogc @safe immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutable(char)[]).to(return immutable(char)[])'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
dmd failed with exit code 1.
I don't understand what's wrong with the module
https://github.com/nordlow/phobos-next/blob/master/src/zio.d
When I compile it separately I don't get the linker error.
/usr/bin/dmd --version: DMD64 D Compiler v2.076.0-dirty
/usr/bin/dub --version: DUB version 1.5.0, built on Sep 1 2017
More information about the Digitalmars-d-learn
mailing list