Importing a module from another directory

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 27 09:38:55 PST 2014


On Saturday, 27 December 2014 at 17:36:39 UTC, Derix wrote:
> What am I missing ? Or, to put it more simply, what would be the
> correct dmd command line to import a module defined in a sibling
> directory ?

I don't know about the IDE, but the command line is easy: all 
your projects modules can be listed on it and it will work.

dmd yourfile.d journal/journal.d


giving them all at once means the necessary code will always be 
found, compiled, and linked in. It is also generally faster than 
trying to compile files separately, and easier too - an all 
around win.


More information about the Digitalmars-d-learn mailing list