perl - "error: variable length array of non-POD element type"编译 re::engine::RE2 时

标签 perl compiler-errors cpan re2

我正在尝试安装 re::engine::RE2 带有 cpan 的模块.

构建时,编译器会发出错误消息:

re2_xs.cc:254:25: error: variable length array of non-POD element type
      're2::StringPiece'
    re2::StringPiece res[re->nparens + 1];
                        ^

这意味着什么?我该如何解决?我使用的是 2011 Macbook Air 和 Perl 5.12。

最佳答案

re::engine::RE2 was never successfully tested on darwin/Perl 5.12.

谷歌搜索错误消息表明这是 Xcode 附带的旧 clang 中的一个缺陷,并且不存在于较新版本中。

升级您的软件,you're out of support ,也许使用 Macports 来获得新的 gcc。

关于perl - "error: variable length array of non-POD element type"编译 re::engine::RE2 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17440137/

相关文章:

perl - 如何为 qx(command) 实现超时?

linux - 如何在 perl 脚本中插入 awk 命令?

matlab - 调用该功能不起作用

perl - 在没有 CPAN 的情况下安装 Perl 模块

perl - 数据库驱动器 :SQLite disconnect

windows - Perl 文件::查找 Windows 反斜杠目录路径

perl - 如何通过 main::的符号表和标量变量中的 sub 名称访问 sub

terminal - 通过cygwin终端在我的Windows上安装hydra时“no acceptable c compiler found in $PATH”

java - Eclipse编译问题

perl - 用于从头开始创建 .pdf 的最佳 Perl 模块是什么?