[Issue 16423] ModuleInfo missing when linking to static lib with classes

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Sep 20 15:40:59 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16423

--- Comment #4 from Martin Nowak <code at dawg.eu> ---
Another rather obvious solution is to tell the linker to include the whole
archive, sensibly named --whole-archive/--no-whole-archive for ld.

Unfortunately dmd currently reorders linker flags (see issue 15574), so the
following doesn't work.

  -L--whole-archive mystaticlib.a -L--no-whole-archive

Instead you'll have to invoke cc for linking yourself atm.

--


More information about the Digitalmars-d-bugs mailing list