digitalmars.D.learn - What is the difference between static linking with .a and .so
WhatMeWorry <kheaser gmail.com> writes:
I'm studying the D article at: https://dlang.org/articles/dll-linux.html#dso5 https://dlang.org/articles/dll-linux.html#dso6 Statically Linking D Program With libphobos2.a Statically Linking D Program With libphobos2.so Don't we want to Dynamically link with shared libphobos2.so? Also why doesn't Windows have a libphobos.dll file. I only find a libphobos.lib
Adam D. Ruppe <destructionator gmail.com> writes:
On Tuesday, 2 February 2021 at 22:39:40 UTC, WhatMeWorry wrote:Don't we want to Dynamically link with shared libphobos2.so?Yeah, I imagine what they meant was statically binding to the dynamic link library as opposed to loading certain procedures at runtime one by one. With the .a file, there's no need to have the phobos.so file at all to run the program. With the so statically bound (though still dynamically linked) it is needed to run the program. With a full dynamic link and bind you might be able to run the program with or without it.Also why doesn't Windows have a libphobos.dll file. I only find a libphobos.libdruntime as a dll is so horribly broken it would be irresponsible to attempt it right now.