问题描述
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 / br>
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
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”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!