1

I'm using boost library for regular expression, I used boost::regex() function to compile the regular expression. I have to catch the exception thrown by this function call. So I used boost:regex_error in catch().

But the use of this function gives following error:

undefined symbol: _ZTIN5boost11regex_errorE

What is the reason of above error?

Bart
  • 19,692
  • 7
  • 68
  • 77
BSalunke
  • 11,499
  • 8
  • 34
  • 68
  • You need to link with the boost regex library (which you will have to build first). – hmjd Aug 16 '12 at 10:18

2 Answers2

3

You have to link with boost_regex. On GCC, add -lboost_regex to your linker invocation. Other compilers will have equivalent options.

Kerrek SB
  • 464,522
  • 92
  • 875
  • 1,084
1
$ c++filt _ZTIN5boost11regex_errorE
typeinfo for boost::regex_error

So typeinfo is missing. I think you should compile your project with RTTI (run time type information) enabled.

or

g++ undefined reference to typeinfo

Community
  • 1
  • 1