3 ms·
Because static linking has been out of vogue for so incredibly long in the C/C++ worlds, and above that, most languages either compile down to C, or are interpr
by qwertyuiop924 11y ago
Because static linking has been out of vogue for so incredibly long in the C/C++ worlds, and above that, most languages either compile down to C, or are interpreted.
- pjmlp 11y agoDepends which C and C++ worlds you mean. In the GNU/Linux world maybe, but that is just one planet in the C and C++ galaxy.
- qwertyuiop924 11y agoI mean broadly almost all unixes, Mac, and Windows. All the big platforms. In embedded systems and plan9, static linking never left. But for mainstream development for desktop and server systems? Static linking has been out for a while.
- vvanders 11y agoGamedev is also very pro-static linking. *nix doesn't encompass all of C/C++.
- qwertyuiop924 11y agoHuh. You learn something every day. But for the most part, everybody still links against libc dynamically. Solaris has actually stopped providing libc.a!
- sveiss 11y agoWhich makes sense when you think of libc as "the library which provides the system call interface to the OS, and just happens to provide a C runtime library as well". Making libc dynamic link only allows the OS developers to change the userland/kernel land interface as they see fit without breaking compatibility. The fact that this also ties you to a dynamically linked C runtime library is an artifact of the close ties between Unix and C. Over in Windows land, there isn't a tight coupling between libc and the system call interface. libc is provided by your compiler (Visual C++ provides static and dynamic versions), while the system call interface is provided by ntdll.dll and friends, which are part of the OS and free to change in future OS versions.
- qwertyuiop924 11y agoTrue enough, I suppose. It did break some stuff though. Go apparently encodes the syscall table. https://news.ycombinator.com/item?id=8817568 https://news.ycombinator.com/item?id=8817568
- pjmlp 11y agoYes, because the changes they did to the library aren't compatible with static linking. https://blogs.oracle.com/rie/entry/static_linking_where_did_it https://blogs.oracle.com/rie/entry/static_linking_where_did_... However, that is one implementation of one compiler in one specific OS.
- qwertyuiop924 11y agoTrue, but it shows the way the wind is blowing.
- deleted 11y ago[deleted]