D packages, include directories, and rdmd
Andrew Pennebaker
andrew.pennebaker at gmail.com
Thu Oct 27 14:56:49 PDT 2011
I've got a single-file D module,
dashcheck.d<https://github.com/mcandre/dashcheck>,
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.
I put dashcheck.d in ~/.d/, and I put export DFLAGS=-I~/.d in ~/.profile,
but when I try to run example.d from another directory, I get:
$ ./example.d
./example.d(3): Error: module dashcheck is in file 'dashcheck.d' which
cannot be read
import path[0] = /usr/local/Cellar/dmd/2.051/src/phobos
import path[1] = /usr/local/Cellar/dmd/2.051/src/druntime/importCheers,
It appears that rdmd ignores $DFLAGS.
Also, when I change the shebang in example.d to #!/usr/bin/env rdmd $DFLAGS,
I get:
$ ./example.d
sh: -I~/.d.d.deps: No such file or directory
So I'm not using import directives correctly. How do I generate
dashcheck.d.deps?
Andrew Pennebaker
www.yellosoft.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111027/cd563cf3/attachment-0001.html>
More information about the Digitalmars-d
mailing list