Cocoapods OpenCV 2.4.10 Linker Error

前端 未结 6 556
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 17:20

I\'m trying to build a simple project using OpenCV 2.4.10 but I get a bunch of errors like this:

Undefined symbols for architecture x86_64:
  \"_jpeg_free_large\", re         


        
6条回答
  •  我在风中等你
    2021-02-01 17:46

    I've added the new versions of OpenCV to CocoaPods (2.4.11, 2.4.12, 2.4.12.3, 3.0.0).

    2.4.11, 2.4.12, and 2.4.12.3 need libjpeg to be linked, so now the pod actually downloads the repo, compiles from source, and then links libjpeg in addition to the opencv2.framework file. This works out of the box now through CocoaPods, however it takes a while when doing pod install since it's compiling from source. Just make sure not to cancel it while it's doing that (there's a bug in CocoaPods that causes issues if it's canceled).

    Under the hood, 3.0.0 works just like before with the prebuilt opencv2.framework file and can now be installed just fine through CocoaPods.

    Version 2.4.10 is still broken in CocoaPods, but since that version throws errors while compiling from source on my machine, there's not much I can do.

    (Note: I am not the original maintainer of the pod, I merely contributed these new versions.)

提交回复
热议问题