完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在使用 Arduino IDE 对 ESP8266 进行编程,并想使用 std::unordered_map。
我所有的代码都是: 代码:全选#include std::unordered_map letter_counts {{'a', 27}, {'b', 3}, {'c', 1}}; void setup() { } void loop() { // put your main code here, to run repeatedly: } 我包含了头文件....并遇到了各种链接失败。我在论坛中看到的一个建议是将“-lstdc++”添加到 platform.txt 中“compiler.c.elf.libs”的末尾。 我这样做了,现在我得到了一个不同的编译器错误,如下所示。任何想法出了什么问题? 代码:全选c:/users/dell/appdata/roaming/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib\libstdc++.a(hashtable_c++0x.o): In function `std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned int) const': d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:60:(.text._ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj+0x7d): dangerous relocation: call0: call target out of range: ceil c:/users/dell/appdata/roaming/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib\libstdc++.a(hashtable_c++0x.o): In function `std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned int, unsigned int, unsigned int) const': d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:84:(.text._ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj+0x5a): dangerous relocation: call0: call target out of range: floor d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:88:(.text._ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj+0x91): dangerous relocation: call0: call target out of range: floor collect2.exe: error: ld returned 1 exit status Error compiling. 代码:全选C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\adafruit C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\test_stl.cpp -o C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\test_stl.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-gcc -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -g -x assembler-with-cpp -MMD -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\adafruit C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266\cont.S -o C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\cont.S.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\cont_util.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_eboot_command.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_flash_utils.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_i2s.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_noniso.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_phy.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_postmortem.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_si2c.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_timer.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_analog.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_digital.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_pulse.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_pwm.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_shift.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\libc_replacements.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_cache.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_check.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_gc.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_hydrogen.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_nucleus.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\time.c.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\abi.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_main.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\debug.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Esp.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\FS.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\HardwareSerial.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\IPAddress.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\MD5Builder.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\pgmspace.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Print.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_api.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_hal.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Stream.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\StreamString.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Tone.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Updater.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\WMath.cpp.o Using previously compiled file: C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\WString.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\cont.S.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\cont_util.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_eboot_command.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_flash_utils.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_i2s.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_noniso.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_phy.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_postmortem.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_si2c.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_timer.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_analog.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_digital.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_pulse.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_pwm.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_wiring_shift.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\libc_replacements.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_cache.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_check.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_gc.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_hydrogen.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_nucleus.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\time.c.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\abi.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\core_esp8266_main.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\debug.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Esp.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\FS.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\HardwareSerial.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\IPAddress.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\MD5Builder.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\pgmspace.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Print.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_api.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\spiffs_hal.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Stream.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\StreamString.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Tone.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\Updater.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\WMath.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar cru C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\WString.cpp.o C:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-gcc -g -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -LC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/lib -LC:\Users\dell\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/ld -Teagle.flash.4m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -o C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/test_stl.cpp.elf -Wl,--start-group C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp\test_stl.cpp.o C:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp/arduino.ar -lm -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig -lwps -lcrypto -laxtls -lstdc++ -Wl,--end-group -LC:\Users\dell\AppData\Local\Temp\build365299809116152627.tmp c:/users/dell/appdata/roaming/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib\libstdc++.a(hashtable_c++0x.o): In function `std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned int) const': d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:60:(.text._ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj+0x7d): dangerous relocation: call0: call target out of range: ceil c:/users/dell/appdata/roaming/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib\libstdc++.a(hashtable_c++0x.o): In function `std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned int, unsigned int, unsigned int) const': d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:84:(.text._ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj+0x5a): dangerous relocation: call0: call target out of range: floor d:\ivan\projects\arduinoesp\toolchain\dl\gcc-xtensa\build-2\xtensa-lx106-elf\libstdc++-v3\src\c++11/../../../../../libstdc++-v3/src/c++11/hashtable_c++0x.cc:88:(.text._ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj+0x91): dangerous relocation: call0: call target out of range: floor collect2.exe: error: ld returned 1 exit status Error compiling. |
|
相关推荐
1个回答
|
|
要在 Arduino IDE 中使用 unordered_map,需要在 platform.txt 中做一些设置。请按照以下步骤进行操作:
1. 找到 Arduino IDE 安装目录中的 platform.txt 文件。在 Windows 上的默认位置是 C:Program Files (x86)Arduinohardwarearduinoavrplatform.txt。 2. 打开 platform.txt 并找到“compiler.c.elf.libs”的行。 3. 将“-lstdc++”添加到该行的末尾,用逗号与其他库分隔开。 4. 保存并关闭 platform.txt。 5. 重新启动 Arduino IDE 并编译你的代码。 如果你仍然遇到编译器错误,请确保你正在使用支持 C++11 的版本的编译器。在 Arduino IDE 开发板管理器中选择相应的 ESP8266 开发板时,确保选择的是 C++11 支持版本。 希望这可以解决你的问题。 |
|
|
|
只有小组成员才能发言,加入小组>>
140 浏览 0 评论
1158 浏览 1 评论
584浏览 6评论
482浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
467浏览 5评论
466浏览 4评论
441浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 19:02 , Processed in 1.001764 second(s), Total 77, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号