问题描述
mac OS X 无法生成 make 文件并给我一个问题
mac OS X has failed to generate a make file and gives me a problem
DOLATs-MacBook-Air:~ dolatsingh$ cd Documents/ardupilot/ArduCopter/
DOLATs-MacBook-Air:ArduCopter dolatsingh$ make apm2//BUILDROOT=/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_S741cb0cgqtcddc_h0000gn/T/ArduCopter.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_S741cb0cgqtcddc_h0000gn/T/ArduCopter.build%% AP_State.o
DOLATs-MacBook-Air:~ dolatsingh$ cd Documents/ardupilot/ArduCopter/
DOLATs-MacBook-Air:ArduCopter dolatsingh$ make apm2// BUILDROOT=/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_AVR_APM2 TOOLCHAIN=AVR EXTRAFLAGS=-DGIT_VERSION="705d3d56"%% AP_State.o
**cc1plus:错误:无法识别的命令行选项-std=gnu++11"make: ***** [/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build/AP_State.o] 错误 1
**cc1plus: error: unrecognized command line option "-std=gnu++11"make: ***** [/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build/AP_State.o] Error 1
我检查了 GCC 版本,它是 4.2.1
i have checked GCC version and it's 4.2.1
推荐答案
您需要升级您的 IDE(如果您使用的是 Arduino IDE).
You'll need to upgrade your IDE (if you're using the Arduino IDE).
从 IDE 的 1.5.8 版开始,GCC 一直是 4.8.1 版.但是,您需要使用您使用的命令行开关手动启用它.
Since version 1.5.8 of the IDE, GCC has been version 4.8.1. However, you'll need to manually enable it with the command line switch you were using.
如果您抓取最新的(1.6.2 及更高版本,当前为 1.6.9)C++11,则默认启用.
If you grab the latest (1.6.2 and above, currently 1.6.9) C++11 is enabled by default.
这篇关于cc1plus:错误:无法识别的命令行选项“-std=gnu++11"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!