为什么我无法在 iPhone 上编译引用 vImage 库的代码?

发布于 2024-10-07 06:58:10 字数 464 浏览 6 评论 0 原文

我正在尝试在我的代码中包含基于 vImage 的功能。但编译失败 - 它甚至似乎根本无法识别函数/变量。

但与此同时,基于 vDSP 的代码似乎运行良好。此外,代码在模拟器中编译,但在设备中失败。

示例代码(失败)如下所示

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

@implementation test 

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

,DSPComplex(基于 DSP 的代码)在同一框架中工作正常,而 vImagePixelCount(基于 vImage 的代码)则失败。有人能帮我解决这个问题吗? iOS4 中不包含 vImage 吗?

我在设备中使用iOS4.2。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

新人笑 2024-10-14 06:58:10

这里值得注意的是,由于这是“vImage iOS”的顶级 google 结果,因此对 vImage 的支持已添加到 iOS 5 中

。iOS 的 vImage 参考可在此处找到:https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vImage/简介/简介.html

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

厌倦 2024-10-14 06:58:10

vImage 目前在 iOS 上不可用。比较这两个文档:

一个有 vImage 功能,另一个没有。它在模拟器中工作的原因是模拟器实际上使用 Mac 框架而不是 iOS 版本。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文