2013-01-03 135 views
1

可能重复:
Undefined symbol for architecture i386 compile error caused by CACurrentMediaTime()未定义的符号: “_ CACurrentMediaTime”

我尝试使用此功能: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 

回答

8

将QuartzCore框架添加到您的项目中。