Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-11-11 09:51:43


--- In boost_at_y..., John Maddock <John_Maddock_at_c...> wrote:
>
> >So my question is what specific thing is threadmon doing that you
think
> >requires the DLL version of the runtime?
>
> It has to built as a dll, but I suspect it can be built to do a
static link
> to the rtl. However I'm not sure that this is a build system
issue - the
> thread lib is completely trivial to build from within your favoured
IDE -
> in short you can do anything you want with it.

Will it compile when statically linked to the RTL? Of course. Would
this cause problems for all programs built this way? Probably not.
However, the chances of the user getting things wrong here are
EXTREMELY high, especially considering that the sole purpose of
threadmon is to cleanup thread specific storage which will almost
assuredly be allocated on the heap using the RTL by the application,
while the cleanup runs in the DLL.

The concept that a programmer can follow some simple rules and get
this correct is usually not accurate. The rules are simply not
simple and are hard to insure that you follow them. I understand the
frustration caused by the decision to only link dynamically against
the RTL for certain advanced users, but the dangers involved are
simply too great. If you insist on statically linking you'd better
know what you're doing, and in that case you really don't need the
supplied build system any way.

Bill Kempf


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