Why can not I compile a code referencing the vImage library on the iPhone?

advertisements

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.


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.