if file hh.d contains : int hh_t ( int x) { writeln ("hhh x= ", x ); } and file test.d (in same dir as file hh.d ) contains : import std.stdio ; import hh ; void main() { hh_t(3); } Why does compiling test.d generate an "undefined ref" ?