一、问题描述
With the latest release of windows 8,a new GNU has also been created and due to which many compilers might not work properly with the new GNU.Due to change in the GNU of windows 8,new versions of compilers are coded for C and C++ program to successfully run. Most of the users might get following error while using the older version of dev-cpp in windows 8 which will generate the following error :
Compiler: Default compiler
Executing gcc.exe...gcc.exe "C:\Users\James\Documents\Homework\TA_CPRE_185\counter.c" -o "C:\Users\James\Documents\Homework\TA_CPRE_185\counter.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
二、解决办法
This error is generated due to the use of Older version of MinGW(Minimalist GNU for windows) and TDM-GCC in Windows 8(出错的原因是你用了旧版本的MinGW和TDM_GCC).
You can download newer version of Dev-Cpp for windows 8 from the following link(你只需要从下方链接下载for Win8的最新版即可)
Dev-Cpp 5.3.0.3 TDM-GCC x64 4.6.1 for windows 8(64bit)
上面的链接是64位版本的,32位版本的链接请自行到此处寻找相应版本下载:
32bit_Download_Click me
首先卸载旧版本的Dev-Cpp,接着点击上面的链接下载安装文件。笔者下载安装后,亲测了一番:在Win8下随便写个"Helllo World"可以正常运行!终于解决了诸如:
[Resource error] no resources 或者 Aborted (program collect2)
等各种奇葩问题了。
欲了解更多,可前往原英文博客查看:Original Article