dmd仅有头的模块,方便编译
--- electron.di ---
module electron;
pragma(root); // 仅头库
int orbit() { return 3; }
--- atom.d ---
module atom;
import core.stdc.stdio;
import electron;
void main() {
printf("%d orbits\n", orbit());
}
编译:
dmd atom
就像你输入了:
dmd atom electron
类似dmd -i.
浙公网安备 33010602011771号