Andrei Alexandrescu wrote:
grauzone wrote:
I don't really understand what you mean. But if you want the compiler to scan for dependencies, I fully agree.

I claim that we don't even need incremental compilation. It would be better if the compiler would scan for dependencies, and if a source file has changed, recompile the whole project in one go. This would be simple and efficient.

That's precisely what rdmd does.

This looks really good, but I couldn't get it to work. Am I doing something wrong?

--- o.d:
module o;

import tango.io.Stdout;

void k() {
    Stdout("foo").newline;
}

--- u.d:
module u;

import o;

void main() {
    k();
}



$ rdmd u.d
/tmp/u-1000-20-49158160-A46C236CDE107E3B9F053881E4257C2D.o:(.data+0x38): undefined reference to `_D1o12__ModuleInfoZ' /tmp/u-1000-20-49158160-A46C236CDE107E3B9F053881E4257C2D.o: In function `_Dmain':
u.d:(.text._Dmain+0x4): undefined reference to `_D1o1kFZv'
collect2: ld returned 1 exit status
--- errorlevel 1
rdmd: Couldn't compile or execute u.d.

$ dmd|grep Compiler
Digital Mars D Compiler v1.041

Andrei

Reply via email to