我剪掉了一段 .c 代码,但我不想将其移植到 Objective-C。这个.c文件在iPhone平台上工作,但在OS X上不行。看来编译器不知道如何处理
#import <CoreGraphics/CoreGraphics.h>
所以它不知道CGImageRef:
ImageArray3D *ia3d_createWithCGImage(CGImageRef image, int nLargestElements);
error: syntax error before 'image'
感谢您的帮助! ;)
最佳答案
您是否将 ApplicationServices.framework 添加到您的目标中?
关于OS X 应用程序中的 CGImageRef?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1311426/