On Saturday, 29 August 2020 at 12:06:38 UTC, Andre Pany wrote:
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.

This highly depends on your actual project:

- which 3rd party dependencies do you have
- are these dependencies d source code only or wrapping C libraries - is the c source code of your dependencies available and you are able to create a static library of them
- does the license of the c dependencies allows static linking

Kind regards
Andre

I am trying to link the GTK library. I have the GTK Runtime installed on Windows 10 pc.

Do I need to build the static GTK library from the source? Then how do I tell DUB to include that library?

Reply via email to