Regex_iterator undefined reference—C++11

/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o:在函数‘parse_query_string(std::string const&)’中:
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:28:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_iterator(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, std::basic_regex<char, std::regex_traits<char> > const&, std::bitset<11ul>)’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:29:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_iterator()’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:31:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_iterator(std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:33:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator*()’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:34:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator*()’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:31:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator++(int)’未定义的引用
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:31:对‘std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator!=(std::regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)’未定义的引用
collect2: 错误:ld 返回 1


++++++++++++++++++++++++++++
https://geekwentfreak-raviteja.rhcloud.com/blog/2014/08/04/c11-regex-using-g/
http://stackoverflow.com/questions/8561850/compile-stdregex-iterator-with-gcc

The GNU C++ standard library supports <regex>, but not until version 4.9.0. (The headers were present in earlier versions, but were unusable.)

++++++++++++++++++++++++++++++++
Build GCC 4.9.2 for C/C++ on CentOS 7

yum install libmpc-devel mpfr-devel gmp-devel

cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2

cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(167) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
posted @ 2016-02-01 00:00  张同光  阅读(311)  评论(0编辑  收藏  举报