From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-08-16 12:13:47
----- Original Message -----
From: "John Maddock" <John_Maddock_at_[hidden]>
> >Why wouldn't it? This arrangement seemed to raise alarm bells for Bill as
> >well, but I can't understand why. A static lib is just an archive of
> >files. If you compile them with the right options, there's no reason they
> >can't be part of a shared lib.
> Because normally when you link to a static lib, only referenced code gets
> included in the output file. Building dll's is different - you want all
> the code in the output file regardless of whether it's referenced or not.
It seems to me that you want all the code that's referenced by an exported
> Now it may be that VC6 will automatically include anything that's tagged
> __declarspec(dllexport), but gcc will just link in what it needs (same
> other unix compilers I think).
...but it needs everything that is referenced by an exported symbol.
> I seem to remember seeing of ways in which
> a static lib can be converted to a shared lib (probably involves declaring
> the symbols you want as undefined/external to force their inclusion), but
> it's far from trivial or portable IMO.
In any case, doesn't the enclosed subproject (which works under the build
system with cygwin, BTW) sort of put the argument to rest? Or have I missed
> The problem is quite easy to reproduce: it occures whenever there is a
> dependency to a lib that either doesn't exist, or Jam doesn't know how to
> exe bad_exe : bad_exe.cpp <lib>does_not_exist : ;
Ah, thank you! It looks to me as though two people have run into this
problem at the same time.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk