Re: Importing module from the perspective of submodule.

2022-07-03 Thread Paul Backus via Digitalmars-d-learn

On Sunday, 3 July 2022 at 05:40:30 UTC, BoQsc wrote:
Is it possible to import module that is not in the module's 
current directory's folder or subfolders?


For example:

I want to import `somemodule2.d` and `somemodule3.d` into a 
**`somemodule.d`**


**.\somefolder\somemodule.d**
.\somemodule2.d
.\someotherfolder\somemodule3.d


Yes. You just have to pass the folders with the modules in them 
to the compiler with the `-I` flag, or (if you're using dub) add 
the folders to your `importPaths`.


```
dmd -Isomeotherfolder -c somefolder\somemodule.d
```


Importing module from the perspective of submodule.

2022-07-02 Thread BoQsc via Digitalmars-d-learn
Is it possible to import module that is not in the module's 
current directory's folder or subfolders?


For example:

I want to import `somemodule2.d` and `somemodule3.d` into a 
**`somemodule.d`**


**.\somefolder\somemodule.d**
.\somemodule2.d
.\someotherfolder\somemodule3.d