Re: Linking libraries
On Jul 2, 7:27 pm, Paavo Helde <myfirstn...@osa.pri.ee> wrote:
Giuliano Bertoletti <gbe32...@libero.it> wrote in news:4c2e2827$0$18999
$4fafb...@reader5.news.tin.it:
[...]
If everything is linked statically, you could also link to the static
runtime C and C++ libraries. If some parts remain in separate shared
libraries, you have to link to dynamic runtime, which should be the same
version and build for all the code then.
The whole point of using dynamic linking is that the versions of
the dynamically linked object can vary from one machine to the
other. (Otherwise, you generally shouldn't use dynamic
linking.) Under Solaris, for example, if you link against
libc.so, you're code will probably run on all versions of
Solaris you're likely to encounter---if you link against libc.a
(supposing Sun/Oracle even provided it), then your program will
likely only work on the same version of Solaris as the one you
used when you linked it. (I presume that the same holds for
Windows, but to date, I've only used one version of Windows
professionally.)
Maintain a master Makefile or equivalent which allows you to
build or rebuild everything (incl. third-party libraries) by
one click or command. There is also a useful Hudson tool for
automating this.
Maybe. If you're not delivering sources, that your clients
should compile, it's probably better to maintain each of the
third party libraries separately.
--
James Kanze