How to organize a project with local scripts in subdirectories using dub?
drug
drug2004 at bk.ru
Wed Dec 11 16:06:30 UTC 2019
On 12/11/19 6:52 PM, Pavel Shkadzko wrote:
>
> 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
>
Add to dub.json:
"targetType": "executable"
and it will build executable. Or rename evaluator.d to app.d
It is confused that there is no app.d so it thinks that you build a
library.
More information about the Digitalmars-d-learn
mailing list