cc1plus: error: unrecognized command line option “-std=gnu++11”

痴心易碎 提交于 2019-12-13 06:09:52

问题


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_AVR_APM2 TOOLCHAIN=AVR EXTRAFLAGS=-DGIT_VERSION="705d3d56" %% AP_State.o

**cc1plus: error: unrecognized command line option "-std=gnu++11" make: ***** [/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build/AP_State.o] Error 1

i have checked GCC version and it's 4.2.1


回答1:


You'll need to upgrade your IDE (if you're using the Arduino IDE).

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.

If you grab the latest (1.6.2 and above, currently 1.6.9) C++11 is enabled by default.



来源:https://stackoverflow.com/questions/36678263/cc1plus-error-unrecognized-command-line-option-std-gnu11

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!