I am trying to add a gif to my image view, so following instructions off the web, I imported the FLAnimatedImage
and FLAnimatedImageView
classes I downloaded. I added them to a group in my project, selected copy, and used Those classes. Now I get 15 errors, described below.
我正在尝试为我的图像视图添加一个gif,所以按照web上的说明,我导入了我下载的FLAnimatedImage和FLAnimatedImageView类。我将它们添加到项目中的一个组中,选择copy,并使用这些类。现在我得到了15个错误,如下所述。
The description part is the :
描述部分为:
Ld "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator/iMark OS.app/iMark OS" normal i386
cd "/Users/mark/Desktop/Xcode Projects/iMark OS"
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator -F/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator -filelist "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Intermediates/iMark OS.build/Debug-iphonesimulator/iMark OS.build/Objects-normal/i386/iMark OS.LinkFileList" -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreData -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator/iMark OS.app/iMark OS"
And the error part is:
误差部分是
Undefined symbols for architecture i386:
"_CACurrentMediaTime", referenced from:
___42-[FLAnimatedImage addFrameIndexesToCache:]_block_invoke_2 in FLAnimatedImage.o
"_CGImageSourceCopyProperties", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_CGImageSourceCopyPropertiesAtIndex", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_CGImageSourceCreateImageAtIndex", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
-[FLAnimatedImage predrawnImageAtIndex:] in FLAnimatedImage.o
"_CGImageSourceCreateWithData", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_CGImageSourceGetCount", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_CGImageSourceGetType", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_OBJC_CLASS_$_CADisplayLink", referenced from:
objc-class-ref in FLAnimatedImageView.o
"_UTTypeConformsTo", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_kCGImagePropertyGIFDelayTime", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_kCGImagePropertyGIFDictionary", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_kCGImagePropertyGIFLoopCount", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_kCGImagePropertyGIFUnclampedDelayTime", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
"_kUTTypeGIF", referenced from:
-[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I fix this?
我怎么修复这个?
1 个解决方案
#1
12
I figured it out. There were 3 missing frameworks, QuartzCore,ImageIO, and MobileCoreServices. for any future viewers who have the same problem, you look in the .h and .m files to see what frameworks they import. Images:
我想出来。有3个缺失的框架,QuartzCore,ImageIO和MobileCoreServices。对于任何有相同问题的未来查看者,您可以查看.h和.m文件,查看它们导入的框架。图片:
.h: .m
. h:00
Then, you click on project, go into build phases, link binary with libraries, and add the frameworks for both your project and projecttest . not really sure if you have to add for both of them. Well, that worked for me, so hopefully it works for other people.
然后,单击project,进入构建阶段,链接二进制文件和库,并为项目和projecttest添加框架。我不确定你是否需要把它们都加进去。这对我来说是行得通的,所以希望对其他人也行得通。
#1
12
I figured it out. There were 3 missing frameworks, QuartzCore,ImageIO, and MobileCoreServices. for any future viewers who have the same problem, you look in the .h and .m files to see what frameworks they import. Images:
我想出来。有3个缺失的框架,QuartzCore,ImageIO和MobileCoreServices。对于任何有相同问题的未来查看者,您可以查看.h和.m文件,查看它们导入的框架。图片:
.h: .m
. h:00
Then, you click on project, go into build phases, link binary with libraries, and add the frameworks for both your project and projecttest . not really sure if you have to add for both of them. Well, that worked for me, so hopefully it works for other people.
然后,单击project,进入构建阶段,链接二进制文件和库,并为项目和projecttest添加框架。我不确定你是否需要把它们都加进去。这对我来说是行得通的,所以希望对其他人也行得通。