c++11 - AX_CXX_COMPILE_STDCXX_11 不起作用 : syntax error near unexpected token `,'

标签 c++11 configure autotools autoconf

尝试在我的 configure.ac 文件中使用 AX_CXX_COMPILE_STDCXX_11,如下所示:

...
AX_CXX_COMPILE_STDCXX_11(, optional)
...

但是,导致错误:
./configure: line 16126: syntax error near unexpected token `,'
./configure: line 16126: `AX_CXX_COMPILE_STDCXX_11(, optional)'

我也放了this file进入 configure.ac 文件旁边的 m4 目录并有 AC_CONFIG_MACRO_DIR([m4])一开始就在 configure.ac 中调用。
以前有人遇到过这样的事情吗?

最佳答案

我的问题通过运行解决了 autoreconf -f而不是 autoconf . https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/autoreconf-Invocation.html

关于c++11 - AX_CXX_COMPILE_STDCXX_11 不起作用 : syntax error near unexpected token `,' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24923600/

相关文章:

ubuntu - 如何使用自动工具构建静态和共享库?

c++ - 区分STL容器

c++ - Pre C++11 等效于显式删除构造函数( Type(const Type&) = delete; )

python - Docker找不到配置文件

linux - 使用 nccmp 配置失败

c++ - 如何在没有库的情况下安装 header (仅 header 的库)?

C++ 编译器无法识别 std::stringstream::swap

c++ - 无法使用非成员开始和结束函数编写基于范围的内容

makefile - 将 $ORIGIN 添加到 LDFLAGS 时遇到困难

internationalization - 如何使用 Automake 将 gettext mo 文件安装到/usr/share/locale?