Swift opencv List compilation error not found

Many people provide a solution in Objective-c by renaming .m to .mm. But how to solve it in Swift?

+4
source share
3 answers

I ran into this problem recently by converting Obj-C to a hybrid with Swift / Obj-C. I was fully aware of the "m" / "mm" problem, so that was not my problem.

What caused this problem for me was that I included the include file in the 'bridging' header, which referred to OpenCV - both the #include file and some definitions. Oops

Answer: check how your #include link file somehow refers to opencv - remove.

+2
source

In my case, the problem was in the import line in the prefix header file. After removing this import, my problem is resolved enter image description here

0
source

I ran into this problem when working with opencvframework. I fixed this problem by adding #import opencv2 / opencv.hpp to the target .h files. It can help you!

0
source

All Articles