Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem using Boost regex
From: John Maddock (john_at_[hidden])
Date: 2009-12-08 07:09:10


> Hi John, I have some new information this morning. I got up early and
> created a simple console app using the App Wizard (Visual Studio 8 Express
> Edition). Into the main source file (test_proj.cpp) I typed this code:-

> That's the entire code, in case you want to reproduce the problem. This
> also gave me the same problem as yesterday (i.e. the Release build runs
> fine, but not the Debug build). After a few experiments I found that it
> comes down to the following project setting:-
>
> Properties->C/C++->Code Generation->Runtime Library
>
> If the Debug version is set to "Multi-threaded Debug", boost links to
> libboost-regex-vc80-mt-sgd-1_40.lib and the app runs fine. OTOH if I
> leave
> that setting at its default value ("Multi-threaded Debug DLL") boost links
> to libboost-regex-vc80-mt-gd-1_40.lib and the app won't run.
>
> Armed with this information I went back to yesterday's project and tried
> the
> same change. Unfortunately, that's a much more complex project and it
> won't
> link in Multi-threaded Debug mode (I get lots of errors about duplicated
> symbols). However, I hope that might help you to make sense of the
> problem.

Nope, I confess to not understand manifests at all (does anyone?).

In any case that configuration is basically how we run our regression
tests - so it certainly should work - and your test case works OK for me
here.

The only thing I can suggest is that since the regex lib is "just a bunch of
source files" that you either:

rebuild the libraries yourself: follow the getting started guide at
http://www.boost.org/doc/libs/1_41_0/more/getting_started/index.html but
basically you want to invoke:

bjam --with-regex --build-type=complete stage

which will put all the regex binaries in stage/lib.

Or... add the source files in libs/regex/src/*.cpp directly to your project,
and then add the #define BOOST_REGEX_NO_LIB to your project settings and
rebuild.

HTH, John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net