On Thursday, 25 February 2016 at 17:46:18 UTC, Thalamus wrote:
On Thursday, 25 February 2016 at 16:05:37 UTC, Benjamin Thaut wrote:
[...]

Thanks Benjamin. When I went to whittle this down to its barest essentials, though, the repro is pretty simple. It involves LIBs, but not Dlls, and it doesn't require anything but a single D EXE.

[...]

The problem is that when you build with -lib the resulting library is optimized for linker stripping. E.g. everything that is not directly used will not be pulled into the final executable. If you want everything in the final exectuable you shouldn't be using a .lib file. Instead compile with -c resutling in a .obj file and link the resulting .obj file into your executable. Then everything will end up in the final executable even if its not directly used.

Kind Regards
Benjamin Thaut

Reply via email to