smallB
smallB

Reputation: 17120

Cannot use boost::regex

When trying to use boost regex library by #include'ing boost/regex.hpp and then creating object of this class:

boost::regex empty_line("^\\s*$");  

I'm getting following error while trying to compile it:

D:\...\boost\regex\v4\cpp_regex_traits.hpp:366: error: undefined reference to `boost::re_detail::cpp_regex_traits_char_layer<char>::init()'  

Any idea how to resolve it?

Upvotes: 2

Views: 616

Answers (1)

Loki Astari
Loki Astari

Reputation: 264391

Boost regex is one of the few parts of boost that require you to build the boost library and link against it.

See: Windows Unix

Upvotes: 4

Related Questions