November 26, 2005 "class C(float f)" and auto / C!(1.2) | ||||
---|---|---|---|---|
| ||||
Attachments: | class C(float f){ float ff = f; } int main(){ auto a = new C!(1.2); // OK C!(1.2) b = new C!(1.2); // FAILS return 0; } gcc b.o -o b -lphobos -lpthread -lm -Xlinker -L/opt/dmd/140/dmd/lib b.o(.gnu.linkonce.d._init_1b29__T1CVde00000000000000000000Z1C+0x0): multiple definition of `_init_1b29__T1CVde00000000000000000000Z1C' b.o(.gnu.linkonce.d._init_1b29__T1CVde00000000000000000000Z1C+0x0): first defined here b.o(.gnu.linkonce.d._Class_1b29__T1CVde00000000000000000000Z1C+0x0): multiple definition of `_Class_1b29__T1CVde00000000000000000000Z1C' b.o(.gnu.linkonce.d._Class_1b29__T1CVde00000000000000000000Z1C+0x0): first defined here b.o(.gnu.linkonce.d._vtbl_1b29__T1CVde00000000000000000000Z1C+0x0): multiple definition of `_vtbl_1b29__T1CVde00000000000000000000Z1C' b.o(.gnu.linkonce.d._vtbl_1b29__T1CVde00000000000000000000Z1C+0x0): first defined here collect2: ld returned 1 exit status - --- errorlevel 1 Added to DStress as http://dstress.kuehne.cn/run/t/template_class_13_A.d http://dstress.kuehne.cn/run/t/template_class_13_B.d Thomas |
Copyright © 1999-2021 by the D Language Foundation