可能重复:
CACurrentMediaTime((导致架构i386编译错误的未定义符号
我试图使用这个函数:CACurrentMediaTime((,因为我需要当前时间,但我得到了这个错误
Ld /Users/aruffolo/Library/Developer/Xcode/DerivedData/Star-hbmohpuyghsjeseyswvvpevxkesj/Build/Products/Debug/Star.app/Contents/MacOS/Star normal x86_64
cd "/Users/aruffolo/Documents/Programmazione/Learning Objective-c/Star"
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/aruffolo/Library/Developer/Xcode/DerivedData/Star-hbmohpuyghsjeseyswvvpevxkesj/Build/Products/Debug -F/Users/aruffolo/Library/Developer/Xcode/DerivedData/Star-hbmohpuyghsjeseyswvvpevxkesj/Build/Products/Debug -filelist /Users/aruffolo/Library/Developer/Xcode/DerivedData/Star-hbmohpuyghsjeseyswvvpevxkesj/Build/Intermediates/Star.build/Debug/Star.build/Objects-normal/x86_64/Star.LinkFileList -mmacosx-version-min=10.8 -fobjc-arc -fobjc-link-runtime -framework SystemConfiguration -framework CoreMedia -framework Cocoa -o /Users/aruffolo/Library/Developer/Xcode/DerivedData/Star-hbmohpuyghsjeseyswvvpevxkesj/Build/Products/Debug/Star.app/Contents/MacOS/Star
Undefined symbols for architecture x86_64:
"_CACurrentMediaTime", referenced from:
-[MyView runLoop] in MyView.o
ld: symbol(s) not found for architecture x86_64
将QuartzCore框架添加到您的项目中。