how to import file from another path in dub ?

Flaze07 christianseiji.cs at gmail.com
Thu Jul 5 09:28:51 UTC 2018


On Thursday, 5 July 2018 at 08:55:13 UTC, Timoses wrote:
> Depending on your use case I see these options:
> - If you have a library that defines the symbols that you are 
> using in the imported files you could use the dub `libs` setting
> - Otherwise, if you're just using the other folder to separate 
> code you can redefine dub's `sourcePaths`. I believe it 
> overwrites the previous, so you have to include your 'source' 
> folder again:
>
> "sourcePaths": ["source", "<importPath>"]
>
>
> When using sourcePaths, dub actually passes all files within 
> all mentioned paths to dmd to compile.
>
>
> Hope I got it right : D.

I see...so that means, I only need importPaths if I have compiled 
it to libs got it


More information about the Digitalmars-d-learn mailing list