D import stmt doesn`t seem to ' import'
FeepingCreature
feepingcreature at gmail.com
Tue Jul 28 05:54:41 UTC 2020
On Tuesday, 28 July 2020 at 05:45:03 UTC, Andy Balba wrote:
> 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" ?
dmd test.d hh.d or dmd -i test.d. import is purely at the
language level, it doesn't affect the linker.
More information about the Digitalmars-d
mailing list