ios - Cocoapods OpenCV 2.4.10 链接器错误

标签 ios xcode opencv cocoapods

我正在尝试使用 OpenCV 2.4.10 构建一个简单的项目,但我遇到了一堆这样的错误:

Undefined symbols for architecture x86_64:
  "_jpeg_free_large", referenced from:
      _free_pool in opencv2(jmemmgr.o)
  "_jpeg_free_small", referenced from:
      _free_pool in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)

Here is ViewController.m

#import "ViewController.h"
#import <opencv2/opencv.hpp>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    cv::Mat greyMat;
}

播客文件

platform :ios, '8.1'

pod 'OpenCV', '2.4.10'

当我使用版本 2.4.9.1 或 2.4.9 时,项目构建得很好。
我还能够使用从 podspec 2.4.10 中找到的 URL 下载的框架文件来构建这个项目。

最佳答案

Bug 4052 2.4.10 仍未解决,2.4.11 没有 pod,因此您必须使用 IMO 稳定的 2.4.9。

如果您使用 pod

pod 'OpenCV', '2.4.9'

关于ios - Cocoapods OpenCV 2.4.10 链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28331397/

相关文章:

ios - 有没有办法将 UIToolbar 子类化?

iphone - 在应用程序启动时弹出非 Root View Controller (iOS)

python-3.x - 在自动调整大小的窗口中选择ROI

ios - ObjC : +[NSObject isSubclassOfClass:] gives incorrect failure

ios - ApplePay `paymentAuthorizationViewController:didAuthorizePayment:handler:` 在 Xcode Simulator 10.3 中未调用

ios - iOS 8 设备上没有 Xcode 的静默通知问题

c++ - 键入对 `cv::fastFree(void*)' 的 undefined reference

ios - 如何覆盖导航栏

ios - 在 iOS 上使用语音输入后视频停止

python - 如何使用 python OpenCV 在匹配特定值的单 channel 图像中查找最大连通分量?