/usr/lib/gcc/x86_64-linux-gnu/7/../../../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.
Note that I tried this with multiple dependency options. I figured at this point that main is not being generated for some reason, so I remove the -main flag and add in my own main function (so now just running with the -unittest flag)
The unittests for run.dlang.org do not seem to be running when there are dependencies.
I have no issue running the following code with flags
-unittest -main
and getting the expected resultHowever, if I add in a library
then I get the following error
Note that I tried this with multiple dependency options. I figured at this point that main is not being generated for some reason, so I remove the -main flag and add in my own main function (so now just running with the
-unittest
flag)And now it does not print anything. If I remove the dub.sdl line at the top and the dependency, then it prints the expected result.