Boost logo

Boost :

From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-10-26 04:40:25

On Fri, Oct 25, 2002 at 12:54:21PM +0100, John Maddock wrote:
> > Could anyone post the executable size generated by a run-of-the-mill
> > regexp search on a char* for Greta and Regex++? Thank you.
> 56K for VC7 and static linking to boost.regex, still too big for you?

As a real-world example, I'm making an ftp client in VC7 that uses the
statically linked Boost.Regex for parsing server replies. The executable
is 221 kb. I tried commenting out all the code that uses regex (this
means not only commenting out the actual regex code, but also some code
that directly depends on the results of the regex matching). The
resulting executable was 171 kb, i.e. a 50 kb difference.

Shared libraries and generic templates don't really go together very
well. The library has to include mostly anything the user _may_ want to
use. As for splitting the library up as Andrei suggests, sure it's
doable. But there are already many different build variants to choose
from. The number of variants increases exponentially with the number of
options. At this point, I'm starting to feel it's going to be easier to
just change the makefile to fit my needs, than have to wade through all
the different builds to find the one that suits me best.

More importantly shared libraries are supposed to be shared. Where's the
sharing if every application has its own variant of the library?

The official standpoint from MS on dynamic-link libraries is that to
avoid "DLL Hell" as they call it, "private DLLs" (i.e. DLLs not created
by Microsoft?) should be installed in the same directory as the
application, and be used only by that application. (See
Since Boost gives no guarantees that interfaces etc will be the same
between different releases, any Boost DLLs are definitely at risk of
causing "DLL Hell."

John, perhaps BOOST_REGEX_STATIC_LINK should be the default? :)

Mattias Flodin <flodin_at_[hidden]>  -
Room NADV 102
Department of Computing Science
Umeå University
S-901 87 Umeå, Sweden
"I don't care to belong to a club that accepts people like me as members."
  -- Groucho Marx

Boost list run by bdawes at, gregod at, cpdaniel at, john at