Static linking D apps for distribution to the cloud, etc.

Jon Degenhardt jond at
Tue Oct 8 22:23:39 UTC 2019

On Tuesday, 8 October 2019 at 19:35:03 UTC, kinke wrote:
> On Tuesday, 8 October 2019 at 18:28:14 UTC, David J Kordsmeier 
> wrote:
>> I'll go back and review the best practices for using curl with 
>> phobos.  I still am struggling to make this work, as something 
>> that would be relatively simple in C to perform (statically 
>> link to any libraries I would like).
> Phobos 2.069 switched to loading libcurl at runtime, see 
> It mentions that it's still possible to link it statically into 
> the executable.

The TSV Utilities have used static linking for Linux prebuilt 
release binaries for a couple years now without any problems. The 
tools do not use curl or gethostbyaddr, but there are still 
plenty of warning messages. (Example:

Static linking was suggested by Jacob Carlborg, who pointed out 
that the pre-built binaries wouldn't run on all Linux 
distributions. Static linking fixed it, with no subsequent 
problems reported (

More information about the Digitalmars-d mailing list