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
相关文章推荐
- centos7.1 QT5编译出现:cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- Ubuntu15.04 QT5编译出现cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- Arduino上“Collect2.exe: error: ld returned 5 exit status”错误的解决方法
- centos7.1 QT5编译出现:cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- 自学QT之QT编程中出现collect2.exe:-1: error: error: ld returned 1 exit status的解决办法
- 【Qt】编译时collect2.exe:-1: error: error: ld returned 1 exit status
- 关于Qt交叉编译过程中出现的collect2: ld returned 1 exit status问题的解决方案
- 自学QT之QT编程中出现collect2.exe:-1: error: error: ld returned 1 exit status的解决办法
- Linux gcc编译提示:undefined reference to `sqrtf' collect2: error: ld returned 1 exit status
- pthread线程创建出现undefined reference to `pthread_create' collect2: error: ld returned 1 exit status
- Eclipse CDT 代码首次编译通过,第二次编译提示error: ld returned 1 exit status
- collect2.exe: error: ld returned 1 exit status
- QT4静态编译后,编译程序总是通不过,提示“ error: collect2: ld returned 1 exit status”
- mingw 编译 libgpg-error 时候 出现ld.exe: .libs/libgpg-error-0.dll.def:8: syntax error的解决方案
- QT4 编译错误 error: collect2: ld returned 1 exit status
- 自定义库引用时编译出错“collect2: error: ld returned 1 exit status”
- QT4 编译错误 error: collect2: ld returned 1 exit status
- Android开发-编译ICS时遇到collect2: ld returned 1 exit status错误解决方案
- QT4 编译错误 error: collect2: ld returned 1 exit status
- error: collect2: ld returned 1 exit status