8266程序编译错误error: unrecognized command line option '-std=gnu++17'-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2900|回复: 6

[未解决] 8266程序编译错误error: unrecognized command line option '-std=gnu++17'

[复制链接]
发表于 2021-3-22 17:38 | 显示全部楼层 |阅读模式
Arduino:1.8.13 (Windows 10), 开发板:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

D:\various apps\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\various apps\Arduino\hardware -hardware C:\Users\N\AppData\Local\Arduino15\packages -tools D:\various apps\Arduino\tools-builder -tools D:\various apps\Arduino\hardware\tools\avr -tools C:\Users\N\AppData\Local\Arduino15\packages -built-in-libraries D:\various apps\Arduino\libraries -libraries D:\文档\Arduino\libraries -fqbn=esp8266com:esp8266:nodemcu:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10813 -build-path C:\Users\N\AppData\Local\Temp\arduino_build_991958 -warnings=none -build-cache C:\Users\N\AppData\Local\Temp\arduino_cache_107502 -prefs=build.warn_data_percentage=75 -verbose D:\桌面\clock\esp8266\esp8266.ino

D:\various apps\Arduino\arduino-builder -compile -logger=machine -hardware D:\various apps\Arduino\hardware -hardware C:\Users\N\AppData\Local\Arduino15\packages -tools D:\various apps\Arduino\tools-builder -tools D:\various apps\Arduino\hardware\tools\avr -tools C:\Users\N\AppData\Local\Arduino15\packages -built-in-libraries D:\various apps\Arduino\libraries -libraries D:\文档\Arduino\libraries -fqbn=esp8266com:esp8266:nodemcu:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10813 -build-path C:\Users\N\AppData\Local\Temp\arduino_build_991958 -warnings=none -build-cache C:\Users\N\AppData\Local\Temp\arduino_cache_107502 -prefs=build.warn_data_percentage=75 -verbose D:\桌面\clock\esp8266\esp8266.ino

Using board 'nodemcu' from platform in folder: D:\various apps\Arduino\hardware\esp8266com\esp8266

Using core 'esp8266' from platform in folder: D:\various apps\Arduino\hardware\esp8266com\esp8266

"C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" "D:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/makecorever.py" --build_path "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958" --platform_path "D:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266" --version unix-3.0.0-dev

Detecting libraries used...

"C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958/core" -c -w -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_NODEMCU_ESP12 -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU_ESP12\"" -DFLASHMODE_QIO -DESP8266 "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958\\sketch\\esp8266.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\N\AppData\Local\Temp\arduino_build_991958\sketch\esp8266.ino.cpp

Generating function prototypes...

"C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958/core" -c -w -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_NODEMCU_ESP12 -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU_ESP12\"" -DFLASHMODE_QIO -DESP8266 "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-ID:\\various apps\\Arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958\\sketch\\esp8266.ino.cpp" -o "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_991958\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17'

exit status 1

为开发板 NodeMCU 0.9 (ESP-12 Module) 编译时出错。


只有loop和setup时能够编译成功。还请大佬帮忙看看!


发表于 2021-3-22 18:37 | 显示全部楼层
更新下package 和 点灯库看看
 楼主| 发表于 2021-3-22 20:10 | 显示全部楼层
XlinliY.Zhang 发表于 2021-3-22 18:37
更新下package 和 点灯库看看

太谢谢了   不过又报了别的错。  点灯库版本最新了已经,之前试了旧版本的还是不行。

正在编译项目...
"C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" "C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4/tools/signing.py" --mode header --publickey "D:\\桌面\\clock\\esp8266/public.key" --out "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_85914/core/Updater_Signing.h"
"C:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4/tools/sdk/include" "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4/tools/sdk/lwip2/include" "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_85914/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_QIO -DESP8266 "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4\\cores\\esp8266" "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4\\variants\\nodemcu" "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\N\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.4\\libraries\\ESP8266HTTPClient\\src" "-ID:\\文档\\Arduino\\libraries\\NTPClient" "-ID:\\文档\\Arduino\\libraries\\FastLED\\src" "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_85914\\sketch\\esp8266.ino.cpp" -o "C:\\Users\\N\\AppData\\Local\\Temp\\arduino_build_85914\\sketch\\esp8266.ino.cpp.o"
In file included from D:\桌面\clock\esp8266\esp8266.ino:8:0:
D:\�ĵ�\Arduino\libraries\FastLED\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
#    pragma message "FastLED version 3.004.000"
                     ^
In file included from D:\�ĵ�\Arduino\libraries\FastLED\src/FastLED.h:65:0,
                 from D:\桌面\clock\esp8266\esp8266.ino:8:
D:\�ĵ�\Arduino\libraries\FastLED\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
#      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^
In file included from D:\�ĵ�\Arduino\libraries\FastLED\src/FastLED.h:48:0,
                 from D:\桌面\clock\esp8266\esp8266.ino:8:
D:\�ĵ�\Arduino\libraries\FastLED\src/fastpin.h: In instantiation of 'class FastPin<16u>':
D:\�ĵ�\Arduino\libraries\FastLED\src/platforms/esp/8266/clockless_esp8266.h:21:49:   required from 'class ClocklessController<16, 20, 50, 30, (EOrder)66u, 0, false, 50>'
D:\�ĵ�\Arduino\libraries\FastLED\src/chipsets.h:578:7:   required from 'class WS2812Controller800Khz<16u, (EOrder)66u>'
D:\�ĵ�\Arduino\libraries\FastLED\src/FastLED.h:103:52:   required from 'class WS2812<16u, (EOrder)66u>'
D:\�ĵ�\Arduino\libraries\FastLED\src/FastLED.h:302:39:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2812; unsigned char DATA_PIN = 16u; EOrder RGB_ORDER = (EOrder)66u]'
D:\桌面\clock\esp8266\esp8266.ino:76:58:   required from here
D:\�ĵ�\Arduino\libraries\FastLED\src/fastpin.h:210:2: error: static assertion failed: Invalid pin specified
  static_assert(validpin(), "Invalid pin specified");
  ^
使用 1.0  版本的库 ESP8266WiFi 在文件夹: C:\Users\N\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi
使用 1.2  版本的库 ESP8266HTTPClient 在文件夹: C:\Users\N\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266HTTPClient
使用 3.2.0  版本的库 NTPClient 在文件夹: D:\文档\Arduino\libraries\NTPClient
使用 3.4.0  版本的库 FastLED 在文件夹: D:\文档\Arduino\libraries\FastLED
exit status 1
为开发板 NodeMCU 0.9 (ESP-12 Module) 编译时出错。
发表于 2021-3-22 21:56 | 显示全部楼层
看起来像FastLED库的报错,更新IDE到1.8.13
 楼主| 发表于 2021-3-23 16:19 | 显示全部楼层
XlinliY.Zhang 发表于 2021-3-22 21:56
看起来像FastLED库的报错,更新IDE到1.8.13

已经是最新的了
发表于 2022-1-10 21:57 | 显示全部楼层
ESP8266 Board 更新到 3.0.2 版本即可自动解决。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 17:44 , Processed in 0.073777 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表