opencv2/opencv.hpp file not found in Xcode

前端 未结 9 2074
悲哀的现实
悲哀的现实 2020-12-30 10:14

I have built openCV to get opencv2.framework. I added this to my xcode iOS project by going to \"build phases->Link Binary With Libraries\", then tried to include \"opencv2

9条回答
  •  星月不相逢
    2020-12-30 10:24

    Took me 4 hours to figure this out. This is how I got this to work : Along with the opencv framework add the following frameworks in the build phases:

    Accelerate, AssetsLibrary, AVFoundation , CoreGraphics , CoreImage , CoreMedia , CoreVideo , QuartzCore , UIKit , Foundation.

    Then, in the .pch file add these lines before UIKit and Foundation imports :

    #ifdef __cplusplus
    #import 
    #endif
    

提交回复
热议问题