配置错误“需要支持C ++ 11语言功能的编译器。”

米格尔·梅斯基塔(Miguel Mesquita)裁缝

我正在尝试根据https://chromium.googlesource.com/breakpad/breakpad/的文档构建Breakpad库,但是当我执行./configure && make时,即使我当前能够执行c ++ 11检查,我也会收到错误消息用c ++ 11编译。

这是来自的输出./configure

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking a.out.h usability... yes
checking a.out.h presence... yes
checking for a.out.h... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... no
checking whether g++ supports C++11 features with -std=c++0x... no
checking whether g++ supports C++11 features with +std=c++11... no
checking whether g++ supports C++11 features with -h std=c++11... no
configure: error: *** A compiler with support for C++11 language features is required.

这是来自的输出g++ --version

g++ (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

这是一个使用c ++ 11编译的示例应用程序:

g++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib UtilsText.cpp -o UtilsText.o
g++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib UtilsWeb.cpp -o UtilsWeb.o
g++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib WorkElement.cpp -o WorkElement.o

我不知道为什么breakpad抱怨我的g ++不支持c ++ 11,或者我是否有办法重写或添加额外的参数,以便它正确地检测到我的编译器。

关于我可能会丢失或做错的任何提示吗?Breakpad是否使用了可能安装在系统中的另一个gcc?

这是config.log文件:http : //pastebin.com/TuHrmiLv

一些程序员哥们

尽管GCC 4.7确实具有某些C ++ 11功能,但它严重缺乏所需的大多数功能。因此,尽管configure脚本使用正确的选项来启用C ++ 11,但编译器实际上无法处理测试程序,因为它使用的旧GCC 4.7版本不具备这些功能。

如果要使用Breakpad,则需要支持旧编译器的较旧版本的Breakpad,或者需要将编译器更新为较新的发行版。5系列应该完全支持C ++ 11。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

确保模板功能的编译器错误

检查是否使用CMAKE在编译器中启用了c ++ 11功能

编译器选项不适用于无序设置的C ++ 11功能

C ++ 11的不同编译器行为

编译器语言支持是否适用于所有编译器端口

Makefile错误“文件需要编译器和库支持”

C编译器在功能之前需要标识符

CentOS 6:配置:错误:编译器必须支持C清理处理

如何使BIML编译器在脚本任务,脚本组件中允许c#6语言功能

csympy cmake错误:编译器不支持C ++ 11构造

GCC汇编语言编译器错误

C ++:来自DLL的编译器错误覆盖功能

C ++ 11编译器的构造函数继承产生错误

C ++ 11:g ++-4.7内部编译器错误

错误此版本的node / NAN / v8需要C ++ 11编译器

使用C语言的图形(GCC编译器)

Matlab:错误消息“ ???当前目标,语言或编译器不支持库'ImfilterBuildable'。”

如何在包含可选字符串功能的Mac OS上安装C11编译器?

Pascal编译器需要SecureZeroMemory功能吗?

Xcode 8.2 Swift编译器错误:“分段错误:11”

Java 8 / Fernflower反编译器:错误或功能

具有重载功能的编译器错误

适用于python的C ++编译器支持的C ++ 11(MinGW和MSVC)(也是cl.exe致命错误)

如何启用VS2013 c ++编译器功能?

Go 1.5的自举编译器是否比用C语言编写的Go 1.4编译器慢?

用编译语言编写的编译器如何处理错误?

启用C ++支持ARMCC编译器

检测编译器是否具有来自Rcpp的完整C ++ 11支持

使用MinGW或VS2012编译器在Qt上启用C ++ 11支持