How does the compiler look for the files of imports?

Jakob a at b.com
Wed Sep 19 05:05:21 PDT 2007


Nathan Reed schrieb:
> BCS wrote:
>> What I want is not the compiler trying to find files. What I want is 
>> the compiler tying to find the root. The files still must be in the 
>> correct places, but I don't want to have to run DMD from correct place.
> 
> So you use the -I flag like Kirk mentioned, to tell it where the root is.
> 
> If you don't like having to remember to type that every time, just use a 
> makefile, or your automated build system of choice.
> 
> Thanks,
> Nathan Reed

Well, i'm writing a tool which creates makefiles.

And if the compiler would analyze the module name to get the module root, it would be much simpler for me :P
Besides, the compiler would not read wrong files as in Kirk's example.



More information about the Digitalmars-d mailing list