www.digitalmars.com         C & C++   DMDScript  

D - Link error (templates)

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() {



// testm.d
module testm;

template foo(T) {
   void foo() { printf("foo");  };

void bar() {

It is possible to use .obj linking someway?
Feb 03 2004