I have a situation where I am trying to build the OpenCV core 4.2.0 in Embarcadero C++ Builder 10.2.x and when the core module gets to ocl.cpp it raises over 40 errors related to IMPLEMENT_REFCOUNTABLE macro. When I exam how CV_XADD is being resolved, it resolves to __c11_atomic_fetch_add((_Atomic (int)*)(addr), delta, __ATOMIC_ACQ_REL).
I have checked this intrinsic and I have no issues with it from a quick console application. I have no issue with the macro CV_XADD when used in a quick console application. I don't get errors on any other OpenCV source file that uses this resolved version of the macro. Does anyone have any idea of why this specific source file is complaining about it?
If I substitute the above resolved intrinsic to (int)__atomic_fetch_add((unsigned*)(addr), (unsigned)(delta), __ATOMIC_ACQ_REL) then source ocl.cpp compiles and the entire DLL module for core compiles.
I am stumped on this because CV_XADD is used in other source files within the core and none of them complain, so why just this file?
Thanks,