2012-02-24 90 views
1

我刚刚在Cygwin的安装铛一个简单的C文件: 铛版本3.1(主干151024) TargetL把i386-pc-cygwin的 线程模型一个简单的C文件(仅适用于主)时,出现错误:铛不能编译

clang version 3.1 (trunk 151024) 
Target: i386-pc-cygwin 
Thread model: posix 
"/usr/local/bin/clang" -cc1 -triple i386-pc-cygwin -S -disable-free -main-file-name t.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -momit-leaf-frame-pointer -v -resource-dir /usr/local/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache -fno-dwarf-directory-asm -fdebug-compilation-dir /toolchain4 -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -o /cygdrive/c/Users/Br0ther/AppData/Local/Temp/t-zyOz8h.s -x c t.c 
clang: error: unable to execute command: Program could not be executed 
clang: error: clang frontend command failed due to signal (use -v to see invocation) 
clang: note: diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information. 
clang: error: unable to execute command: Program could not be executed 
clang: note: diagnostic msg: Error generating preprocessed source(s). 

任何机构那里知道是什么原因导致这个问题?我不知道什么是信息的含义:

clang: error: unable to execute command: Program could not be executed 
clang: error: clang frontend command failed due to signal (use -v to see invocation) 

你的帮助是极大的赞赏 NK

+1

您是否尝试按建议运行'clang -v -c yoursource.c'? – 2012-02-24 08:31:17

回答

1

如果这两条线烦心的事:

clang: error: unable to execute command: Program could not be executed 
clang: error: clang frontend command failed due to signal 
    (use -v to see invocation) 

那么我会建议你(如错误消息中所示)更改命令以查看它使用的调用行:

"/usr/local/bin/clang" -v -cc1 -triple i386-pc-cygwin ... 

然后你会知道程序的名字,你可以调查为什么它不在你的路径上(例如)。