Boost logo

Boost Users :

Subject: Re: [Boost-users] regex instantiation crashes at program exit
From: John Maddock (john_at_[hidden])
Date: 2013-04-24 12:02:03


> I get a crash when trying to instantiate a boost::regex during program
> shutdown. I've boiled down the code to this:

This is your standard order-of-destruction problem: some of regexes internal
data structions have already been destroyed when you come to instantiate the
regex. You can fix this by linking to the dll version of boost.regex
(define BOOST_REGEX_DYN_LIB when building your app). It also works for me
if I add a global instance of boost::regex, but I'm not sure if that's
actually guaranteed to work...

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