D - Link error (templates)
- Ilya Zaitsev (24/24) Feb 03 2004 When I run "dmd test.d testm.d" it compiles and link successfull.
When I run "dmd test.d testm.d" it compiles and link successfull.
But when I try:
dmd -c test.d
dmd -c testm.d
dmd test.obj testm.obj
Last command produces error:
testm.obj(testm) Offset 00161H Record Type 00C3
Error 1: Previous Definition Different : _D5testm05foo_i3fooFZv
My files are:
// test.d
import testm;
void main() {
bar();
foo!(int)();
}
// testm.d
module testm;
template foo(T) {
void foo() { printf("foo"); };
}
void bar() {
foo!(int)();
}
It is possible to use .obj linking someway?
Feb 03 2004








Ilya Zaitsev <sark7 mail333.com>