www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Another linking oddity

I think this error has show up before, but...

(on dmd 0.141 RedHat)
Compile these two files separately and then link them,
	bunch-o-link-errors

Compile them together,
	all's well




----main.d-----
import tmp;

int main()
{
	Tmp!(int).TC n;
}
----tmp.d-----
import std.stdio;

template Tmp (T)	// remove from template and error goes away
{
	class TC
	{
		this()
		{
			writef("boom\n");
		}
	}
}
Jan 12 2006