3 ms·
Dynamic linking on Unixes works fine and achieves what it tries to do: build a single program with pretty much no difference with what it would have been with s
by temac 7y ago
Dynamic linking on Unixes works fine and achieves what it tries to do: build a single program with pretty much no difference with what it would have been with static linking, with no non-portable extra annotation needed at source level.
The dynamic linking model under Windows is completely different: the various PE are way more separated, to the point of causing all kind of craziness at C++ interfaces boundaries even if everything has been compiled with exactly the same compiler (and it better be the case to begin with, if you really have C++ interfaces under Windows -- which for the same reason is often not really recommended). It also has advantages though, for example it is better for some plugin models (but again: not all - it depends on the interface design), and obviously it is way better to run even the most basic regular Win32 programs given how Windows is designed internally with sometimes 2 libC used at the same time and a fat and mandatory dynamic-only user space layer. If you use your own .dll Windows let you build programs that are not covered by the C or C++ standard models (e.g. multiple different C++ implementations used at the same time by a single program). The Windows design also has been influenced by the Win16 era, which had even more exotic requirements.
The models are so different that people used to one usually focus on all the issues the other has, and internalize all the details to the point it can often affect their own design without thinking about it -- it also makes some programs (or even just libraries) harder to port from one system to the other.