0

我正在尝试使用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)
4

1 回答 1

0

您可以像这样在 GPUImage.xcodeproj 中ArchitectureStandard architecturesto更改。Standard architectures (including 64-bit)

项目设置

这是一个能力问题,请参阅this

于 2014-02-28T05:20:27.177 回答