How to organize a project with local scripts in subdirectories using dub?

Pavel Shkadzko p.shkadzko at gmail.com
Wed Dec 11 15:52:09 UTC 2019


On Wednesday, 11 December 2019 at 13:00:32 UTC, drug wrote:
>
> I would restructure your
> folders this way:
> my_proj/
>     source/
>         script_1/runme_1.d
>         script_2/runme_2.d
>         evaluator.d
>
> then using `dub --compiler=ldc2`

It works like this, yes. However, by default it builds a 
"library" while I want to run "evaluator" as a script which uses 
other scripts by calling their functions.

Doing:
dub --compiler=ldc2 --single evaluator.d // throws an error

source\evaluator.d(93,12): Error: module runme_1 is in file 
'runme_1.d' which cannot be read




More information about the Digitalmars-d-learn mailing list