I'm trying to bridge OpenCV c++ to my Swift application.
And I'm getting this error:
Users/admin/Desktop/MDAcne/MDAcne/MDAcne-Bridging-Header.h:14:9: note: in file included from /Users/admin/Desktop/MDAcne/MDAcne/MDAcne-Bridging-Header.h:14:
#import "cvVideoWrapper.h"
^
/Users/admin/Desktop/MDAcne/MDAcne/cvVideoWrapper.h:13:9: note: in file included from /Users/admin/Desktop/MDAcne/MDAcne/cvVideoWrapper.h:13:
#import "algo.hpp"
^
/Users/admin/Desktop/MDAcne/MDAcne/algo.hpp:11:10: note: in file included from /Users/admin/Desktop/MDAcne/MDAcne/algo.hpp:11:
#include <opencv2/video/background_segm.hpp>
^
/Users/admin/Desktop/MDAcne/Pods/OpenCV/opencv2.framework/Headers/video/background_segm.hpp:47:10: error: 'list' file not found
#include <list>
^
<unknown>:0: error: failed to import bridging header '/Users/admin/Desktop/MDAcne/MDAcne/MDAcne-Bridging-Header.h'
cvVideoWrapper.h and cvVideoWrapper.mm connect between the bridging header to algo.hpp which is the c++ file. algo.hpp includes those libraries:
#include <opencv2/video/background_segm.hpp>
#include <opencv2/video/tracking.hpp>
which contains #include <list>
which is a C file that is causing the problem as I understand.
I saw in another question that this can be fixed by changing the .m files to .mm files. I've done this and I still get this error. In addition seems that in my case it's happening in the cvVideoWrapper.h file.
How can this be fixed?