【问题标题】:Cannot build cc-tools with Boost 1.76 on macOS got 'cannot find the flags to link with Boost regex' error无法在 macOS 上使用 Boost 1.76 构建 cc-tools 出现“找不到与 Boost 正则表达式链接的标志”错误
【发布时间】:2021-09-07 06:12:31
【问题描述】:

我正在尝试构建 cc-tool 调试器,如此处所述https://www.zigbee2mqtt.io/information/flashing_the_cc2531.html

但在配置步骤出现此错误

checking for the Boost regex library... no
configure: error: cannot find the flags to link with Boost regex

https://github.com/dashesy/cc-tool/issues/25 此处描述了相同的问题,建议的解决方案是将 boost 降级到 1.60。但它不再起作用了,因为 1.60 从 brew 中删除了。

我尝试使用 clang 编译器代替 gcc,但它也不起作用。

MacOS:大 sur 11.5.2 (20G95)

【问题讨论】:

    标签: c++ boost build


    【解决方案1】:

    解决办法:

    CC=/usr/bin/clang \
    CXX=/usr/bin/clang++ \
    CPPFLAGS=-I/usr/local/include \
    LDFLAGS=-I/usr/local/include \
     ./bootstrap
    
    CC=/usr/bin/clang \
    CXX=/usr/bin/clang++ \
    CPPFLAGS=-I/usr/local/include \
    CXXFLAGS="-std=c++0x" \
    LDFLAGS="-I/usr/local/include -lboost_system" \
    LIBUSB_CFLAGS=-I/usr/local/include/libusb-1.0 \
    LIBUSB_LIBS="-L/usr/local/lib -lusb-1.0" \
     ./configure
    

    它允许使用 boost 1.76 进行配置。在这里找到https://gist.github.com/kidpixo/ef1a26ae953e3939a4eebe1b6fd2f07c

    【讨论】:

      【解决方案2】:

      我今天遇到了同样的问题(相同的操作系统:MacOS 11.5.2)。

      我认为一种解决方案是创建自己的水龙头,并从删除的 boost@1.60 (Homebrew/homebrew-core#84434) 复制公式。

      【讨论】:

        猜你喜欢
        • 2013-07-09
        • 2016-01-13
        • 1970-01-01
        • 1970-01-01
        • 2018-07-13
        • 1970-01-01
        • 2020-06-17
        • 2011-08-24
        • 2011-07-24
        相关资源
        最近更新 更多