Error when using `import`.

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Feb 24 10:34:25 UTC 2024


A few things.

Module names should be lower case.

Each file, needs the full module declaration.


source/foo/bar.d:

```d

module foo.bar;

```


source/app.d:

```d

module app;

import foo.bar;

```


Directories matter, this allows the import path search (via the use of 
the -I switch) to locate modules based upon the filename relative to the 
directory in the search.




More information about the Digitalmars-d-learn mailing list