3 ms·
Gamedev is also very pro-static linking. *nix doesn't encompass all of C/C++.
by vvanders 11y ago
Gamedev 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.