How does the compiler look for the files of imports?

BCS ao at pathlink.com
Tue Sep 18 15:37:21 PDT 2007


Reply to Jakob,

> I have the following files:
> 
> foo/bar.d
> module foo.bar;
> import lol.rofl;
> lol/rofl.d
> module lol.rofl;
> If i change to the directory where "foo" and "lol" are in, and do
> gdc foo/bar.d lol/rofl.d
> it finds all the files.
> If i change to the directory "foo/" and do
> gdc bar.d ../lol/rofl
> it doesn't compile:
> bar.d:3: module rofl cannot read file 'lol/rofl.d'
> 
> IMHO, the compiler should notice that the module name is 'foo.bar'
> (and not only 'bar') and so the directory to search for imports is the
> parent directory. Or what do you think about that?
> 

vote += bigNum;





More information about the Digitalmars-d mailing list