digitalmars.D - D import stmt doesn`t seem to ' import'
- Andy Balba (11/11) Jul 27 2020 if file hh.d contains :
- FeepingCreature (3/14) Jul 27 2020 dmd test.d hh.d or dmd -i test.d. import is purely at the
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" ?
Jul 27 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.
Jul 27 2020