Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-02-03 06:43:02


>Thanks, the library now compiles. I was able to build the static
>library and currently using it my application.
>However, the _DLL preprocessor is still there for the VC++. This is
>the meaning from the doc...

OK let me try and explain this, I use _DLL _MT and _DEBUG in exactly the
same way that Microsoft and STLPort (and a lot of other libraries for that
matter) do. They are used *only* to determine which run-time library is in
use. Since we must link to a regex library that uses the same run time
that the exe is using, this also determines which regex library we link to
by default. There are two macros you may need to know about that control
things a little further:

BOOST_RE_BUILD_DLL is defined when building the regex library as a dll
BOOST_RE_NO_LIB disables all automatic regex library selection.

That means that the following options are possible:

static run time, static regex, automatically selected
dynamic runtime, dynamic regex, automatically selected
dynamic runtime, static regex, manually selected by defining
BOOST_RE_NO_LIB and either adding the regex source to the project, or
manually building the regex source as a statc library.

Other combinations are deliberately not possible because they would lead to
memory management issues - the situaltion for C++ code is different than
for C code BTW, in C you can have a static runtime, and still link to a
dynamic third party C lib - you should *not* do this in C++.

- 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