I've got a single-file D module, <a href="https://github.com/mcandre/dashcheck">dashcheck.d</a>, that I'd like to install as a local package. In other words, I'd like to be able to "import dashcheck;" from any directory.<br>

<br>I put dashcheck.d in <span style="font-family: courier new,monospace;">~/.d/</span>, and I put <span style="font-family: courier new,monospace;">export DFLAGS=-I~/.d</span> in <span style="font-family: courier new,monospace;">~/.profile</span>, but when I try to run example.d from another directory, I get:<br>

<br><span style="font-family: courier new,monospace;">$ ./example.d </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">./example.d(3): Error: module dashcheck is in file 'dashcheck.d' which cannot be read</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">import path[0] = /usr/local/Cellar/dmd/2.051/src/phobos</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">import path[1] = /usr/local/Cellar/dmd/2.051/src/druntime/importCheers,</span><div>

<br>It appears that rdmd ignores <span style="font-family: courier new,monospace;">$DFLAGS</span>.<br><br>Also, when I change the shebang in example.d to <span style="font-family: courier new,monospace;">#!/usr/bin/env rdmd $DFLAGS</span>, I get:<br>

<br><span style="font-family: courier new,monospace;">$ ./example.d </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">sh: -I~/.d.d.deps: No such file or directory</span><br>

<br>So I'm not using import directives correctly. How do I generate dashcheck.d.deps?<br><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>