This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Sep 2017 20:27:30 +0000
- Subject: [Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast
- Auto-submitted: auto-generated
- References: <bug-82366-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It looks like the libstdc++.so.6 that the application links to is older than
the version you compiled against, and doesn't have support for the new
std::string type used in your callback.
It might work to build your code with the macro _GLIBCXX_USE_CXX11_ABI defined
to 0, but what you're trying to do (compile against a new libstdc++ then use an
older one at run-time) is not supported and cannot work in general.