开发者

Why can't I compile code referencing the vImage library on the iPhone?

I am trying to include vImage based functionality in my code. But compile fails - 开发者_开发问答it doesnt even seem to recognize the functions/variables at all.

But at the same time vDSP based code seems to work fine. Also, the code compiles in simulator but fails in the device.

A sample code (which fails) is as follows

#import "test.h"
#include <Accelerate/Accelerate.h>

@implementation test 

-(void) test1{
  DSPComplex d ={1.0, 2.0};
  d;
  vImagePixelCount x = 3;
  x;
}
@end

Here, DSPComplex which is DSP based code, in the same framework - works fine, while vImagePixelCount - which is vImage based code - it fails. Can anyone help me on this? Is vImage not included in iOS4 ?

I am using iOS4.2 in the device.


It's worth noting here, since this is the top google result for "vImage iOS", that support for vImage has since been added to iOS 5.

The vImage reference for iOS is available here: https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vImage/Introduction/Introduction.html


vImage is not available on iOS at the moment. Compare these two documents:

  • Accelerate Framework Reference for OS X
  • Accelerate Framework Reference for iOS

The one has the vImage functions, the other one doesn't. The reason it works in the Simulator is that the Simulator actually uses the Mac frameworks and not the iOS versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜