digitalmars.D - using -unittest leads to undefined errors when linking against
- Timothee Cour (25/25) Dec 08 2017 this is obviously a serious error and is a blocker for running unittests...
this is obviously a serious error and is a blocker for running unittests. also filed: https://issues.dlang.org/show_bug.cgi?id=18049 managed to reduce it to a short example code with zero dependencies: dmd -lib -oflibfun.a fun.d dmd -main -unittest main.d libfun.a Undefined symbols for architecture x86_64: "_D3fun__T1ATtZQf8opEqualsMxFNaNbNiNfSQBj__TQBiTtZQBoZb", referenced from: _D3fun__T1ATtZQf11__xopEqualsFKxSQBf__TQBeTtZQBkKxQsZb in main.o ld: symbol(s) not found for architecture x86_64 ------------------ fun.d: module fun; struct A(T){ bool opEquals(A!T) const { auto a=typeid(A!T); return true; } unittest { alias b = A!(ushort); } } enum ignore = A!int(); main.d: module main; import fun;
Dec 08 2017