Version 2.079 of the DMD compiler has just
been released with improvements to the -betterC
flag. I
just gave it a try, and the D code I linked into a C executable with some
horrible linker hacking in 2016 now works without any linker hacking at all. There’s still some more stuff to test
out when I get around to it, but, hey, here’s some progress:
For reminders, here’s the D code once again:
And here’s the C code:
And here’s it all compiling and linking cleanly:
Nice! Thanks to all the contributors.