Basic C function ends up with error when trying to compile + example
Hello Guys,
Gotta problem here with normal function in c:
My configuration:
OS 10.8
Xcode 5.0.2
Code:
void printMessage (void) { | |
NSLog(@"Test"); | |
} | |
printMessage(); |
Note that this ends up with error:
ProcessPCH /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch test/test-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/cistyprofil/Documents/CA/test
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-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 -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-generated-files.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-own-target-head ers.hmap -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-all-target-head ers.hmap -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-project-headers.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchai n/usr/include -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources/i386 -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources -F/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug --serialize-diagnostics /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.dia -MMD -MT dependencies -MF /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.d -c /Users/cistyprofil/Documents/CA/test/test/test-Prefix.pch -o /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch
error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang failed with exit code 1
Please advise.
MacBook Pro (15-inch Late 2008), OS X Mountain Lion (10.8.5)