On Saturday, 29 August 2020 at 11:27:28 UTC, Kirill wrote:
I need a stand-alone executable that does not require the user
to install any libraries on their computer. Everything should
be packed into the executable.
I understand that I need to statically link all of the
libraries I use in my project, but how do I do this? What do I
need to add to dub.json file? What compiler flags do I need to
use?
Thanks in advance.
In dub.json:
"libs": ["exlib1", "exlib2"],
For any libexlib1.a or exlib2.lib, omit the extensions.
You can also do it like:
"lflags": ["-lstdc++"],