c++使用boost regex编译报错perl_matcher.hpp:382: undefined reference to `boost::re_detail_106100
来源:互联网 发布:少年心气 知乎 编辑:程序博客网 时间:2024/06/06 02:38
最近写的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/perl_matcher.hpp:382: undefined reference to `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> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'collect2: error: ld returned 1 exit statusmake: *** [spellingcheck] Error 1
查了半天发现同一台机器上因为有多个人使用,所以有多个人装boost,导致libboost_regex.a有多个版本,我的boost版本是1.64,有个人装了个1.61,莫名其妙的链接到了别人的库,编译的时候选择一个正确的版本就没问题了
阅读全文
0 0
- c++使用boost regex编译报错perl_matcher.hpp:382: undefined reference to `boost::re_detail_106100
- boost/thread/pthread/thread_data.hpp:143: undefined reference to `vtable for boost::detail::thread_d
- boost log 报错undefined reference to boost::log::v2_mt_posix::basic_formatter
- 使用muduo编译链接错误 undefined reference to `muduo::ThreadPool::run(boost::function<void ()()>&&)'
- Boost [Thread] undefined reference to `boost::thread::thread......undefined reference to `boost::thread::thread......
- boost编译的一个bug:undefined reference to `boost::system::generic_category()'
- undefined reference to boost::system::system_category()
- undefined reference to `boost::system::generic_category()
- clion undefined reference to `boost::system::generic_category()'
- undefined reference to `boost::system::generic_category()问题
- boost的编译安装 以及boost regex的使用
- Boost.Regex 使用
- boost 库Regex使用
- Boost.Regex 使用
- Boost::Regex使用
- Boost.Regex 使用
- boost regex使用详解
- boost regex的使用
- hpuoj 【1147】 统计优秀人数【水题】
- 盒子模型
- Baidu Map和SurfaceView冲突问题
- ng2 碎片2
- Mr.Smile填坑记——点击分享出去的网页,无法跳转自己的app
- c++使用boost regex编译报错perl_matcher.hpp:382: undefined reference to `boost::re_detail_106100
- 解决Requests抓取时中文乱码
- 大端模式和小端模式
- NOIP1998复赛:2的幂次方表示
- java 导入导出excel数据+搜索文章关键词
- 设计模式之单例
- ajax跨域
- API翻译:EAGLSharegroup
- torndb操作方法