简体   繁体   中英

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM