|
Boost Users : |
Subject: Re: [Boost-users] A problem with using boost::regex
From: Michael Lindner (mplmpl_at_[hidden])
Date: 2011-04-20 12:36:29
Thank you John and Steven for your help. Making a library compiled with the
same settings worked, so it appears to have been a compiler option mismatch.
I'll spend more time worrying about which option when I finish this project
and have more time.
Peace,
Mike
On Wed, Apr 20, 2011 at 5:10 AM, John Maddock <boost.regex_at_[hidden]>wrote:
> I have been a boost users for years, but this is the first time I've come
>> across a problem with using it. I'm posting this in the hopes that one of
>> you will say "oh yeah you did 'X' wrong", because I have been beating my
>> head against the wall with this for some time. Thanks for taking a look.
>>
>> -- Michael Lindner
>>
>> I have the following program:
>>
>> #include "boost/regex.hpp"
>> #include <string>
>>
>> int
>> main(int argc, char** argv)
>> {
>> std::string re("[123]abc");
>> boost::regex reg(re);
>> return 0;
>> }
>>
>> It compiles and runs just fine on my Mac and Linux machines. On Windows,
>> however, it compiles fine, and runs fine compiled under the "Debug"
>> configuration. When I change that to "Release" however, it crashes with
>> the
>> following stack trace:
>>
>
> I don't know what to say except it "works for me". Sounds like a typical
> binary compatibility issue though. Two things you could try:
>
> 1) cd into libs/regex/test and do a "bjam regex_regress release" and check
> the test passes OK.
> 2) Create a static lib project in your IDE, add libs/regex/src/*.cpp to it
> and set the build options the same as your .exe. Then set the define
> BOOST_REGEX_NO_LIB in your .exe's project settings and add the static lib as
> a reference and rebuild.
>
> HTH, John.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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