On Jul 2, 11:47 pm, Ian Collins<ian-n...@hotmail.com> wrote:
On 07/ 3/10 10:31 AM, Paavo Helde wrote:
Agreed. DLL sharing is useful only if the DLL is really
stable. In Windows world this would be kernel32.dll and
such. On Linux the C runtime also qualifies, but not in
Windows as there are so many uncompatible versions.
While true, that's a bit too narrow in scope. On my platform
of choice (Solaris), static libraries are largely historical.
On most if not all Unix derived systems, shared libraries are
the way to go.
For the system libraries (e.g. libc.so); I don't think that
Sun/Oracle even deliver statically linkable versions any more.
In some ways, the same holds for Windows. The difference is
that Windows does provide the statically linkable versions, and
that not all of the dynamically linkable versions are bundled
with the OS, so you sometimes have to ship them as well.
For anything above the system level (including the C++ standard
library), I'd go with static linking, unless I specifically
needed some particular behavior of dynamic linking (choosing the
version of the library at runtime, for example).
Interesting, I prefer dynamic linking. Mainly because there
are fewer link order dependencies. I also tend to have