Cannot find module during separate compilation

Satoshi via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 10 08:20:21 PDT 2016


Hello,

I have 2 files:

source/test.d:
module foo.test;

and

source/bar.d
module foo.bar;
import foo.test;


When I am compiling this 2 files together there is no problem.
But when I compile it with -c flag (LDC) compiler thrown an error 
(cannot find foo/test.d)

Why isn't import path resolved from module declaration when it is 
possible?
module foo.bar;
import foo.test;

Compiler should know foo is the same directory in which bar is.


More information about the Digitalmars-d-learn mailing list