Why can't the DMD compiler accept files or directories with white spaces even delimited by quotes?
jfondren
julian.fondren at gmail.com
Sun Sep 5 00:00:33 UTC 2021
On Saturday, 4 September 2021 at 23:50:33 UTC, Marcone wrote:
> Example:
>
> dmd "hello world.d"
```
$ cat hello\ world.d
module helloworld;
void main() {
import std.stdio : writeln;
writeln("without the explicit 'module', this file would");
writeln("be inferred to have an invalid module name.");
}
$ dmd 'hello world.d'
$ ./hello\ world
without the explicit 'module', this file would
be inferred to have an invalid module name.
$ sed -i 1d hello\ world.d
$ dmd 'hello world.d'
hello world.d: Error: module `hello world` has non-identifier
characters in filename, use module declaration instead
```
More information about the Digitalmars-d-learn
mailing list