In university during our C++ year, we had this teacher who only wanted us to use statically linked libraries all the time (We were using windows). I remember asking him: "Why not use dynamic libraries instead?" and he said: "Because that way you can embed everything in the final .exe and you don't have to worry about shipping third party libraries alongside"
And I replied:
"But you are still distributing them, just bundled inside the .exe code. Wouldn't that also require you to include the licenses of those libraries? Also I believe LGPL libraries require your code to be independent from the libraries."
And he finally said: "Sure, I mean, you can play by GPL rules or you can find MIT libraries that don't bug you with legal details."
I haven't done any static linking since then because of two reasons:
1. It's a pain to set up, or at least was on Windows.
2. I want to respect licenses.
3. I use Linux bro, like, 90% of the libraries I use are already pre-installed lmao.
PS: Also I have never bothered figuring out how to statically link on Linux. I know you use .a files instead of .os; but since everything on Linux is often shared libraries I don't see the point.
Any replies are welcomed.