Dave Wilson (dwilson@ttl.ie) wrote:: I have a slight problem.: [ program links library routine Bill() not called from the main program: that calls Fred() ]

Static libraries contain object files. With `nm' you can see what
object files are there, and what functions they contain. The linker
always links complete object files, so that if Fred() and Bill() are
in the same object file, and you link Fred(), you also link Bill().
Object files in libraries that contain no functions that are used are
not linked.