|
Boost : |
From: John Maddock (john_maddock_at_[hidden])
Date: 2002-06-30 06:14:16
> I just compiled the lasted version of the regular expression library.
> The size of released dll is 548 KB! Over 500 KB for regular expression
alone
> in an application? what is going on?
Unfortunately the dll version of the library contains everything that you
might need, rather than just everything that you are actually using. There
are several things you might want to try:
1) Do a static link (if you're using the Microsoft or Borland compilers then
just define BOOST_REGEX_STATIC_LINK when building your app to activate
this). It should cut the overhead down a lot.
2) If you really need to use the lib in a dll (lets say you are sharing
regexes between multiple dll's in your application), then try rebuilding the
dll with the following defines set:
BOOST_NO_WREGEX - if you don't want wide character support.
BOOST_NO_STD_LOCALE - if you don't want std::locale support.
3) If you really need to use the lib as a dll, and (2) doesn't do what you
want, then you could build just those sources that you actually need as a
dll - unfortunately while this works for Borland, MSVC won't let you do
this - if something is declared as exported in the headers then the dll
won't link unless it's actually present :-(
Hope this helps,
John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk