Import all?

Jonathan M Davis jmdavisProg at gmx.com
Thu Jul 18 00:43:18 PDT 2013


On Thursday, July 18, 2013 09:25:46 JS wrote:
> In any case, the real question I have is: Does dmd require each
> directory for each module to be included by -I? Or is the base
> directory good enough and package resolution will get at the sub
> directories?

The base directory of each package hierarchy must be passed to dmd with -I. 
So, if you have the module abc.foo.bar, then dmd must have been passed the 
directory that abc is in. A module's fully qualified name is its directory 
hierarchy, and dmd is always looking for the base of the hierarchy, so you 
give it each directory which is the root of a package hierarchy. If you have 
abc.foo.bar, and you passed it the abc or abc/foo, it would then effectively be 
looking for abc/abc/foo/bar.d or abc/foo/abc/foo/bar.d.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list