我想在 Windows 上的 code::blocks 上使用 C++ 中的 boost 正则表达式。我编译了一个使用指令 regex pat( "^Subject: (Re: |Aw: )*(.*)" );
的简单程序它不起作用,我收到如下错误:c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\boost\regex\v4\cpp_regex_traits.hpp|366|undefined reference to 'boost::re_detail::cpp_regex_traits_char_layer<char>::init()'|
我想我应该将项目链接到“链接器设置”中的某个库(.a 文件?),但我不知道哪个库,我在哪里可以下载它?!
最佳答案
你必须自己编译正则表达式库。请阅读文档 http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/install.html
关于c++ - 在 Windows C++ code::blocks 上 boost 正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13029950/