(CMake):Windows环境下配置Boost
发布日期:2021-05-07 15:17:39 浏览次数:17 分类:原创文章

本文共 368 字,大约阅读时间需要 1 分钟。

Windows环境下配置Boost




  • 编译器选择




  • CMakeLists文件,设置Boost头文件及库文件路径




  • 代码测试



#include <iostream>#include <string>#include <boost/regex.hpp>int main(int, char**) {    std::string str("acc133acc133");    boost::regex e(R"(\d+)");    boost::smatch m;    if(boost::regex_search(str, m, e)){        std::cout << m.str() << std::endl;    }else{        std::cerr << "erro\n";    }}


  • 运行结果





  • 【注】参考

上一篇:(VsCode):Linux远程c/c++环境搭建
下一篇:(CMake):指定标准进行编译、CMake官方文档查看

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2025年04月03日 05时14分28秒