Hacker News new | ask | show | jobs
by brandmeyer 3475 days ago
Not so: The Standard doesn't have anything to say about the differences between static and dynamic libraries, or the differences between a .exe and its .dll's (or .so's). The program is composed of all the things that link into it as far as the ODR is concerned.

The breakage from mixing different library versions (say, MSVCRT versions, for example) is a direct result of violating the ODR.

1 comments

The standard doesn't say anything at all about dynamic linking AFAIK, so it's basically OS-dependent. I think it works (as in the algorithm is well defined) in Linux, but it's best avoided due to complexity and non-portability.