2012-02-24 86 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 ... 

然後你會知道程序的名字,你可以調查爲什麼它不在你的路徑上(例如)。