错误是这样的:
usr/lib/gcc/i686-pc-cygwin/3.4.4/http://www.cnblogs.com/http://www.cnblogs.com/i686-pc-cygwin/bin/as.exe: /usr/li
b/gcc/i686-pc-cygwin/3.4.4/http://www.cnblogs.com/http://www.cnblogs.com/i686-pc-cygwin/bin/as.exe: cannot execute
binary file
几乎把我搞疯掉了,昨天还好好的,今天就出了问题。想破脑袋都想不出到底是哪儿出了问题,
去找as.exe这个文件,奇怪的是error report里的文件地址中并没有这个文件。但是其他的文件夹中有as.exe,
我当时认为应该是自动作了个映射,映射到了\usr\i686-pc-cygwin\bin\as.exe,而让人哭笑不得的是突然这种映射
就没了,所以找不到as.exe。
后来上google搜了一下,找到了这样一封信,信中讲到了同样的问题,是这样说的:
What I found in my case is that Cygwin symbolic links lose the DOS
system attribute after Win4Lin shuts down. Since
.../i686-pc-cygwin/bin/as.exe is supposed to a symbolic link to
/usr/bin/as.exe, gcc cannot run the assembler due to the broken
symbolic link. I verified that this does not happen under a
stand-alone (non-Win4Lin) Win98SE installation; the system attribute
persists between reboots.
Check the attributes for C:\cygwin\usr\i686-pc-cygwin\bin\as.exe
from a DOS command line using the 'attrib' command. If the 'S'
flag isn't displayed, then reset the system attributes using the
command 'attrib +s *.exe'.
看了这个我才明白,并不是映射过去,而是直接把as.exe设成了系统属性,在哪儿都可以访问。
于是我也明白了为什么会出问题,应该是昨天KIS6发狂引起的,突然的把一对非win系统文件列为危险对象,
甚至我自己编译出来的exe文件....as.exe应该是因此被去除了S属性。