GPUImage构建错误

时间:2013-11-02 08:45:27

标签: gpuimage

我正在尝试使用GPUImage,已经成功添加目标并构建,但是当我在viewController和build中使用它时,有一些我无法理解的问题。谁知道为什么?非常感谢你。

代码:

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)

1 个答案:

答案 0 :(得分:0)

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

project setting

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