Compiling multiple source files --- each file separately, or all together?
David Given
dg at cowlark.com
Mon Dec 29 14:52:46 UTC 2025
On Sunday, 28 December 2025 at 22:33:50 UTC, Richard (Rikki)
Andrew Cattermole wrote:
[...]
> D has required metadata, and in the absence of a flag being set
> internally to the compiler, it assumes it is compiling the
> module if you provide it directly on the command line.
[...]
> You must tell the compiler that the module has already been
> compiled, and to only import it, not compile it in.
Mm. I was assuming the compiler would treat explicitly passed .di
files as imports, not implementations. Fair enough. Using the
original .d files instead of the .di files is easy, but something
I was hoping to avoid as it makes the dependency management less
efficient.
My ldmd2 doesn't have -extI yet. Is there an alternative? And I'm
guessing there's no way to pass in a .d file on the command line
but tell the compiler to use it for imports only?
More information about the Digitalmars-d
mailing list