Usage of -deps

bearophile bearophileHUGS at lycos.com
Mon Jul 6 19:15:50 PDT 2009


I don't understand how to use the new -deps command line argument of DMD1/2.
To test it I have created three little modules:

// main.d
import mod1: foo;
void main() {
    printf("%d\n", foo(10));
}


// mod1.d
import mod2: bar;
int foo(int x) { return bar(x) + bar(x); }


// mod2.d
int bar(int x) { return x * x; }

I can compile them normally with:
dmd main.d mod1.d mod2.d

Then I try to use -deps, I use:
dmd -o- -deps=deps.txt main.d mod1.d mod2.d

But the 'deps.txt' file is empty. Can you tell me what's wrong?

Bye and thank you,
bearophile


More information about the Digitalmars-d-learn mailing list