Am Mon, 01 Jul 2013 03:43:27 +0200
schrieb "Milvakili" <[email protected]>:

> On Monday, 1 July 2013 at 00:35:07 UTC, Adam D. Ruppe wrote:
> > It might help to add -Ix to dmd, which adds the x folder to 
> > your import search path.
> >
> > I haven't actually tried it though. I compile my D programs 
> > with all the files listed on the command line at once, I find 
> > it is simpler and often a little faster too.
> 
> -I option is working for me, but the confusing thing is g++ can 
> handle this by default but dmd require it to be explicitly added.
> 
> I have a situation that each code needs to be compiled 
> individually :).
> 
> Thankx.
> 

In D every directory is a package in the module system.
The root of that is where you invoke the compiler.

So if all your code is in "x" or in "source" or whatever you
can either switch into that directory to compile or add -Ix to
the compiler command-line.

If "x" is in fact a package in your case when you think about
it, use the correct "import x.dhelper;"

P.S.: You never need .di files unless you have to hide the
implementation. And when you use them, they are handled
exactly the same as their original .d file.

-- 
Marco

Reply via email to