On Mon, 2017-03-20 at 08:39 +0000, Russel Winder wrote: > […] > Actually it seems worse than that. Even with "dub -b unittest" it > appears that Dub compiles main.d without the -unittest flag to ldc2 > and so the normal application runs.
And different behaviour with different build options, at least when using dmd, but I think the same is true for ldc2: |> dub test No source files found in configuration 'library'. Falling back to "dub -b unittest". Performing "unittest" build using dmd for x86_64. approxgc ~master: building configuration "application"... Linking... /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status Error: linker exited with status 1 dmd failed with exit code 1. 600 anglides:~/Repositories/Git/Masters/ApproxGC_D |> dub test --build=release No source files found in configuration 'library'. Falling back to "dub -b unittest". Performing "release" build using dmd for x86_64. approxgc ~master: building configuration "application"... Linking... Running ./approxgc ["b":["b_1.2.1.txt", "b_1.0.0.txt", "b_1.0.2.txt"], "a":["a_1.1.0.txt", "a_1.0.1.txt", "a_1.0.0.txt"]] ["b_1.0.0.txt", "b_1.0.2.txt", "a_1.0.0.txt", "a_1.0.1.txt"] -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part