如何在终端中显示Xcode错误消息和输出?

时间:2013-08-11 13:37:11

标签: iphone xcode terminal

有什么方法可以使用Xcode来组织我的代码而不是在编译时显示错误? 我希望错误消息和输出显示在终端中。我是一名大学生,正在学习如何用C语言编程。 我真的希望错误消息显示在终端中,因为它们以相当神秘的方式显示在那里,而不是Xcode中的用户友好方式。

1 个答案:

答案 0 :(得分:2)

如果你真的想以一种神秘的格式看错误(大声笑......你为什么要这样!),如果你进入日志导航器,你可以从Xcode访问它( + 7 ,或从Xcode“查看”菜单中选择“导航器” - “显示日志导航器”):

cryptic errors

如果你真的想要不方便的日志结果,你可以方便地在Xcode中使用它们。


您还可以安装命令行工具(转到Xcode首选项 - 下载 - 组件并选择命令行工具),然后从命令行进行构建。例如,要从命令行构建Xcode项目,您可以:

Rob-MacBook-Air:Test rryan$ xcodebuild build Test
=== BUILD NATIVE TARGET Test OF PROJECT Test WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies

CpResource /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ResourceRules.plist build/Release-iphoneos/Test.app/ResourceRules.plist
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ResourceRules.plist /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/Test.app

ProcessInfoPlistFile build/Release-iphoneos/Test.app/Info.plist Test/Test-Info.plist
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    builtin-infoPlistUtility Test/Test-Info.plist -genpkginfo /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/Test.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -resourcerulesfile /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/Test.app/ResourceRules.plist -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/Test.app/Info.plist

ProcessPCH /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch.pth Test/Test-Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7 -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 --serialize-diagnostics /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/Test-Prefix.pch -o /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch.d

ProcessPCH /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch.pth Test/Test-Prefix.pch normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch armv7s -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7s -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 --serialize-diagnostics /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/Test-Prefix.pch -o /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch.d

CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/AppDelegate.o Test/AppDelegate.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7s -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7s -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch -MMD -MT dependencies -MF /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/AppDelegate.d --serialize-diagnostics /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/AppDelegate.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/AppDelegate.m -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/AppDelegate.o

CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/main.o Test/main.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7s -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7s -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-aisxswopiekfbndqblnpblxzgtrl/Test-Prefix.pch -MMD -MT dependencies -MF /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/main.d --serialize-diagnostics /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/main.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/main.m -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7s/main.o

CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/main.o Test/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7 -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch -MMD -MT dependencies -MF /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/main.d --serialize-diagnostics /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/main.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/main.m -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/main.o

CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/AppDelegate.o Test/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7 -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch -MMD -MT dependencies -MF /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/AppDelegate.d --serialize-diagnostics /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/AppDelegate.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/AppDelegate.m -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/AppDelegate.o

CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/ViewController.o Test/ViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/rryan/Dropbox/Private/Personal/Xcode/Test
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.1 -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-generated-files.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-own-target-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-all-target-headers.hmap -iquote /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Test-project-headers.hmap -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources/armv7 -I/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/DerivedSources -F/Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/45/c8s3_0sj11d0vcr6pvg2l01c0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-crjhyljfihiegncnnhikkpkeezqz/Test-Prefix.pch -MMD -MT dependencies -MF /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/ViewController.d --serialize-diagnostics /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/ViewController.dia -c /Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/ViewController.m -o /Users/rryan/Dropbox/Private/Personal/Xcode/Test/build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/ViewController.o
/Users/rryan/Dropbox/Private/Personal/Xcode/Test/Test/ViewController.m:21:5: error: use of undeclared identifier 'i'
    i= 4;
    ^
1 error generated.


** BUILD FAILED **


The following build commands failed:
    CompileC build/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/ViewController.o Test/ViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

=== BUILD NATIVE TARGET Test OF PROJECT Test WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
unsupported build action 'Test'


** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

或者,如果您只想编译一个.c文件:

Robert-Ryans-iMac:test rryan$ clang test.c
test.c:5:10: warning: missing terminating '"' character [-Winvalid-pp-token]
  printf("hello, world);
         ^
test.c:5:10: error: expected expression
1 warning and 1 error generated.