我正在尝试使用GPUImage,已经成功地添加了目标和构建,但是当我在viewController和构建中使用它时,有一些问题我不能理解。有人知道为什么吗?非常感谢。
代码:
UIImage *inputImage = [UIImage imageNamed:@"1"];
GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:inputImage];
GPUImageSepiaFilter *stillImageFilter = [[GPUImageSepiaFilter alloc] init];
[stillImageSource addTarget:stillImageFilter];
[stillImageSource processImage];
UIImage *currentFilteredVideoFrame = [stillImageFilter imageFromCurrentlyProcessedOutput];
UIImageView *image = [[UIImageView alloc] initWithFrame:CGRectMake(60, 60, 200, 300)];
image.image = currentFilteredVideoFrame;
[self.view addSubview:image];
[image release];错误:
ld: warning: ignoring file /Users/xiaodong/Library/Developer/Xcode/DerivedData/SilentGif-cuagrzcstwdoemeamjiufacggbfa/Build/Products/Debug-iphonesimulator/libGPUImage.a, file was built for archive which is not the architecture being linked (x86_64): /Users/xiaodong/Library/Developer/Xcode/DerivedData/SilentGif-cuagrzcstwdoemeamjiufacggbfa/Build/Products/Debug-iphonesimulator/libGPUImage.a
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GPUImageSepiaFilter", referenced from:
objc-class-ref in ThirdViewController-5FAAC33C6210C63D.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)发布于 2014-02-28 13:20:27
您可以在GPUImage.xcodeproj中将Architecture从Standard architectures更改为Standard architectures (including 64-bit),如下所示。

这是一个功能问题,请参阅this。
https://stackoverflow.com/questions/19740323
复制相似问题