Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-16 05:25:43


>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
object
>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.
Now it may be that VC6 will automatically include anything that's tagged as
__declarspec(dllexport), but gcc will just link in what it needs (same with
other unix compilers I think). 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.

>Can you send me the Jamfile? Infinite recursion in the Jam code will cause
>Jam to crash, FWIW.

It's in the cvs, but not the most current version - see
libs/regex/example/Jamfile or :

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/boost/boost/libs/
regex/example/Jamfile?rev=1.1&content-type=text/plain

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
build:

exe bad_exe : bad_exe.cpp <lib>does_not_exist : ;

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk