您的位置:首页 > 产品设计 > UI/UE

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

2017-08-08 10:11 1466 查看


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







Newbie
Posts: 11
Karma: 1  [add]



Re: 1.6.3 ld returmed 5
exit status error with a struct in a class?

#7

Apr
23, 2015, 07:01 pm Last Edit: Apr 23, 2015, 07:18 pm by 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 !   

    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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐