xp系统Arduino编译时,出现collect2.exe: error: ld returned 5 exit status的解决方案

1.运行环境

Windows xp;
Arduino1.6.5 IDE.

2.问题

在Arduino编译时,出现如下的错误: 
collect2.exe: error: ld returned 5 exit status
exit status 1


3.来自国外论坛替换文件的解决方案




Finally, your solution is OK: 

最终,你的解决方案是ok的:

- in IDE 1.6.1, 1.6.2 or 1.6.3, rename the file ld.exe (i.e. OLD-ld.exe) 

in directory C:\Programs\Arduino\hardware\tools\avr\avr\bin;

在ide1.6.1, 1.6.2 or 1.6.3,(我的是1.6.5)的安装路径C:\Programs\Arduino\hardware\tools\avr\avr\bin下 重命名ld.exe (例如OLD-ld.exe);

- copy another file ld.exe from IDE 1.0.6.

复制低版本ide 1.0.6的ld.exe到当前版本。(我找的是1.0.5版的,也可以)

详见原文

http://forum.arduino.cc/index.php?topic=316146.0


oldmaker
Hi f41_ardu,
you are rigth, at least partially.
At last I found time for a complete series of tests about your solution; these are the results:

Context: IDE 1.6.3, Windows XP SP3, Arduino Uno
Test 1:  files ld.exe and ld.bfd.exe copied from a previous IDE version
Test 2:  file ld.exe copied from a previous IDE version and original ld.bfd.exe
Test 3:  only file ld.exe copied from a previous IDE without ld.bfd.exe

- Files from IDE 1.6.0, tests 1, 2 and 3
result: "collect2.exe: error: ld returned 53 exit status", without Windows crash

- Files from IDE 1.5.8, tests 1, 2 and 3
result: "collect2.exe: error: ld returned 53 exit status", without Windows crash

- Files from IDE 1.0.6, tests 2 and 3
result: SUCCESS !    :D    The sketch compiles fine

Note 1: I remind that using IDE 1.6.1, 1.6.2 or 1.6.3, the result is a Windows crash message followed by "collect2.exe: error: ld returned 5 exit status".

Note 2: using file ld.exe copied from IDE 1.0.6, there is no need to rename original ld.bfd.exe, because in 1.0.6 it doesn't exist.

Finally, your solution is OK: 
- in IDE 1.6.1, 1.6.2 or 1.6.3, rename the file ld.exe (i.e. OLD-ld.exe) in directory C:\Programs\Arduino\hardware\tools\avr\avr\bin;
- copy another file ld.exe from IDE 1.0.6.

找到另一个方案

http://www.cnblogs.com/hyper99/p/Arduino-shang-Collect2exe-error-ld-returned-5-exit.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值