Closed jmh530 closed 4 years ago
For run.dlang.org, no main function is generated by the -main flag when there are dependencies.
This is likely related to issue 734 (i.e. perhaps all compiler flags aren't working with dependencies).
Consider
void foo() {}
compiled with -main has no error.
However, when compiling
/+dub.sdl: dependency "automem" version="~>0.6.2" +/ void foo() {}
with -main, then I get the error that
/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 dmd failed with exit code 1.
Closed in favor of 748
For run.dlang.org, no main function is generated by the -main flag when there are dependencies.
This is likely related to issue 734 (i.e. perhaps all compiler flags aren't working with dependencies).
Consider
compiled with -main has no error.
However, when compiling
with -main, then I get the error that