On Wednesday, 14 March 2018 at 14:44:24 UTC, Marc wrote:
Why does -run fail here? I thought it was a shorthand to this batch:

Check the help text:

$ dmd -h
  dmd [<option>...] -run <file> [<arg>...]
<arg> Argument to pass when running the resulting program

Notice that there's only one file there. Everything after it is passed as args to the resulting program. So dmd -run cannot support multiple D files.

Though, with the new `-i` option you might be able to get it to infer modules.

dmd -i -run file_with_main.d args_to_main.......

and if it can locate the other modules automatically it should bring them in there.

Reply via email to