最近写的c++中用到了boost中的regex,但是make的时候老是报这个错误:
main.o: In function `boost::re_detail_106100::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator<char const*, std::string>)':
/usr/local/include/boost/regex/v4/per

在使用Boost库的regex模块进行C++编程时,遇到编译错误'perl_matcher.hpp:382: undefined reference to `boost::re_detail_106100...'。该错误通常与链接器找不到Boost的正则表达式相关实现有关,可能的原因包括Boost库未正确安装或链接选项缺失。
最低0.47元/天 解锁文章
2445





