How to get dub to work when I have dlang installed in custom directory?

sarn via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 3 15:22:07 PST 2017


On Friday, 3 March 2017 at 20:35:04 UTC, Jamal wrote:
> I have no idea what is is wrong and or how to fix it.
>
> Any help?

It would be the alias.  When you're running dmd from your shell, 
you're using an alias that includes a bunch of flags to make dmd 
work.  When dub runs, it'll run the dmd executable directly, not 
your alias, and lose the flags.

You can get rid of the alias and use a dmd.conf instead.  Just 
make a file called "dmd.conf" in the same directory as your dmd 
executable, and put something like this in it:

[Environment32]
DFLAGS=<all your dmd flags for 32b code -- you might not need 
this>

[Environment64]
DFLAGS=<all your dmd flags for 64b code -- same as your current 
"dlang_compile">


More information about the Digitalmars-d-learn mailing list