Current RDMD, please?

Nick Sabalausky a at a.a
Tue Aug 17 13:58:53 PDT 2010


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
news:i4emnt$bcs$1 at digitalmars.com...
>
> I saw the q, and was still mulling for an answer. I the join 
> intentionally, and now I think I remembered why.
>
> The join is needed in the probably rare case when you're running rdmd from 
> a different directory from the root module, e.g:
>
> $ pwd
> ~/foo/bar
> $ rdmd ../baz/main.d
>
> In this case, if there's no join with the rootDir, modules will be looked 
> up in ~/foo/bar/, which is probably not the right thing.
>
> What is your use case?
>

That's what I was starting to suspect.

My case (writing this from memory, if this doesn't behave like I describe, 
then it's something along these lines):

$ cat src/app/main.d
module app.main;
import foo;
void main(){}

$ cat src/lib/foo.d
module lib.foo;

$ xfbuild -Isrc src/app/main.d
Works ok

$ rdmd -Isrc src/app/main.d
dmd craps out because rdmd told it to compile "src/app/src/lib/foo.d"





More information about the Digitalmars-d mailing list