Packages / imports & references between modules
Robert M. Münch
robert.muench at saphirion.com
Sun Apr 28 16:35:09 UTC 2019
On 2019-04-28 16:18:59 +0000, kdevel said:
> This compiles with dmd v2.085.1:
>
> $ cat A/a.d
> module A.a;
> import A.b;
>
> $ cat A/b.d
> module A.b;
> struct myStruct {
> int i;
> }
>
> $ cat A/c.d
> module A.c;
> import A.a;
> import A.b;
>
> struct myOtherStruct {
> myStruct ms;
> }
>
> void main ()
> {
> import std.stdio;
> myOtherStruct mos;
> mos.writeln;
> }
Yes, as long as you are adding the imports all over, things can work.
But as said, if you creating bindings for a larger C library, this is
not practicable.
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
More information about the Digitalmars-d-learn
mailing list