我刚刚在cygwin中安装了clang: clang 3.1版(主干151024) TargetL i386-pc-cygwin 线程模型:posix
但是在尝试编译一个简单的c文件(只有main)时,发生了错误:
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
答案 0 :(得分: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 ...
然后你会知道程序的名称,你可以调查它不在你的路径上的原因(例如)。
答案 1 :(得分:1)
感谢您提出的所有建议。 但是,问题由cygwin的increasing the heap size修复。
由于