Import sources from parent project
Andrey
saasecondbox at yandex.ru
Sat Oct 19 18:00:12 UTC 2019
Hi,
I have got this structure of my project:
> parentapp
> dub.json
> source
> common.d
> childapp1
> dub.json
> source
> app.d
> somefile.d
> childapp2
> dub.json
> source
> app.d
The "childapp1" and "childapp2" are standanole subprograms. I
want to import file "common.d" in both "app.d". How to do it
correctly?
I tried to write "import common;" but got error: " Error: module
`common` is in file 'common.d' which cannot be read".
In "parentapp/dub.json" I also added these lines:
> "dependencies": {
> "parentapp:childapp1": "*",
> "parentapp:childapp2": "*"
> },
> "subPackages": [
> "./childapp1/",
> "./childapp2/"
> ]
More information about the Digitalmars-d-learn
mailing list