www.digitalmars.com         C & C++   DMDScript  

D - Windows DMD Beta v0.63 Error Windows

I receive a linker error when compiling
these two files together.

E:\Programming\D\err1>dmd one.d two.d
e:\Programming\tools\dmd\bin\link.exe one+two,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

two.obj(two)
 Error 42: Symbol Undefined _array_one
--- errorlevel 1

// File one.d
template Temp(Type)
{
  Type func(Type arr[])
  {
    return arr[0];
  }
}

// File two.d
import one;

instance Temp(int) TempInst;

int main(char[][] argv)
{
  int[] foo;
  
  foo.length = 1;
  
  foo[0] = 12;
  
  int a = TempInst.func(foo);
  
  printf("%d\n",a);
  
  return 0;
}
May 27 2003