/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
In both cases, the compiler is set to dmd and no compiler arguments are given.
Passing -run main.d as compiler arguments allows the second example to compile and run successfully.
This example compiles and runs:
This one doesn't:
...with the following error:
In both cases, the compiler is set to
dmd
and no compiler arguments are given.Passing
-run main.d
as compiler arguments allows the second example to compile and run successfully.