How to solve `root with opencv4 header bug`?


_OS version: max OS X 10.15
_ROOT Version:6.22


   #include <iostream>
   #include <opencv4/opencv2/opencv.hpp>

   void p12_root()
   {
   }

   int main()
   {
     p12_root();
   }

root p12_root.cpp
with errors:

/usr/local/include/opencv4/opencv2/core/persistence.hpp:491:9: error: expected identifier
        EMPTY     = 16, //!< empty structure (sequence or mapping)
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/utmpx.h:84:16: note: expanded from macro 'EMPTY'
#define EMPTY           0

It seem a conflict bug of opencv4 @ Mac OS .
But I could run the code if compile it.
I’m not sure if I could run the script without utmpx.h errors?

You need to contact some “opencv4” support.

OK, thanks anyway!