www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How import DUB packcages directly and compile with DMD without use

reply Marcone <marcone email.com> writes:
I just want import in file and run with dmd.
Jul 16 2020
parent reply Andre Pany <andre s-e-a-p.de> writes:
On Thursday, 16 July 2020 at 11:06:01 UTC, Marcone wrote:
 I just want import in file and run with dmd.
Execute dub build with verbose output. You will find the info how dub is calling dmd. Kind regards Andre
Jul 16 2020
parent reply Marcone <marcone email.com> writes:
On Thursday, 16 July 2020 at 11:52:39 UTC, Andre Pany wrote:
 On Thursday, 16 July 2020 at 11:06:01 UTC, Marcone wrote:
 I just want import in file and run with dmd.
Execute dub build with verbose output. You will find the info how dub is calling dmd. Kind regards Andre
dub is calling dmd with -IC:\Users\Usuario\AppData\Local\dub\packages\scriptlike-0.10.3\scriptlike\src but I want dmd auto import any in dub packages, for example: -IC:\Users\Usuario\AppData\Local\dub\packages\.
Jul 16 2020
parent Mathias LANG <geod24 gmail.com> writes:
On Friday, 17 July 2020 at 01:27:09 UTC, Marcone wrote:
 On Thursday, 16 July 2020 at 11:52:39 UTC, Andre Pany wrote:
 On Thursday, 16 July 2020 at 11:06:01 UTC, Marcone wrote:
 I just want import in file and run with dmd.
Execute dub build with verbose output. You will find the info how dub is calling dmd. Kind regards Andre
dub is calling dmd with -IC:\Users\Usuario\AppData\Local\dub\packages\scriptlike-0.10.3\scriptlike\src but I want dmd auto import any in dub packages, for example: -IC:\Users\Usuario\AppData\Local\dub\packages\.
You can alter your `sc.ini` config to add `-I` path. But "auto-importing" package won't work, because packages are stored in a hierarchy that is `dub`-specific and DMD doesn't know about it. The piece of functionality you want sounds exactly like what dub is supposed to do, so why do you want to avoid it ?
Jul 16 2020