opencv2/opencv.hpp file not found in Xcode

前端 未结 9 2051
悲哀的现实
悲哀的现实 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:36

    From my experience, it is not necessary to add so many other frameworks. Instead, only need opencv2 and add "#import " in prefixheader.pch

    The thing is that MUST set correct Framework Search Paths as mentioned above unless opencv2 framework folder is in your project directory.

    Notice: don't set wrong location in Framework Search Paths as there are two "YourProjectName". Set the 1st one (belongs to TARGETS), not the 2nd one(belongs to PROJECT). I made the mistake.

提交回复
热议问题