gpt4 book ai didi

c++ - 使用Arduino编程ATtiny10( "ld.exe"错误)

转载 作者:行者123 更新时间:2023-11-30 14:34:01 26 4
gpt4 key购买 nike

🤔问题

我正在尝试在“Arduino IDE 1.8.9”中为 ATtiny10 编译草图,但总是收到以下错误:

"C:\\Users\\gxous\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=attiny10 -o "C:\\Users\\gxous\\AppData\\Local\\Temp\\arduino_build_433979/testat10_nov26a.ino.elf" "C:\\Users\\gxous\\AppData\\Local\\Temp\\arduino_build_433979\\sketch\\testat10_nov26a.ino.cpp.o" "C:\\Users\\gxous\\AppData\\Local\\Temp\\arduino_build_433979/core\\core.a" "-LC:\\Users\\gxous\\AppData\\Local\\Temp\\arduino_build_433979" -lm
c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find crtattiny10.o: No such file or directory

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libm.a when searching for -lm

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lm

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0\libgcc.a when searching for -lgcc

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lgcc

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libm.a when searching for -lm

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lm

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libc.a when searching for -lc

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lc

c:/users/gxous/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lattiny10

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board ATtiny10/9/5/4.
...
same errors
...
Error compiling for board ATtiny10 (bitDuino10-arduinoTPI).

📋信息

  https://kimio-kosaka.github.io/bitDuino10-arduinoTPI/package_bitDuino10-arduinoTPI_index.json
https://raw.githubusercontent.com/vitasimek/attiny10core/master/package_attiny10core_index.json

💛 片尾

如果我对这个问题的了解不够,请告诉我

有什么想法吗?

提前致谢,

乔治

更新

我实际上所做的(尽管不是您可能期望的解决方案),只是永久安装旧版本的 Arduino IDE,如前所述 here并用于my project也是。

最佳答案

链接器使用了错误的多重库。发生这种情况的原因可能是您为链接器提供了错误的选项,或者因为安装已损坏(或两者兼而有之)。

追踪此类问题的第一步是将 -v 添加到编译器驱动程序的选项(在本例中为 avr-gcc 或 avr-g++),以查看哪些选项传递给子进程。

关于c++ - 使用Arduino编程ATtiny10( "ld.exe"错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59077871/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com