Dinkumware modules error while trying to build OpenCV with CMAKE

I am using Rad Studio 10.2.3 command line with CMAKE 3.17.0 (64 bit) to build OpenCV 3.2.0 libraries for Rad Studio.

I followed the steps described here: https://github.com/IgorYunusov/OpenCV-RS

I had also to modify so of C++ files to be able to start to build it.

When I run "make install" on Rad Studio command line I am getting error messages in Dinkumware C+ files as below.

Is there a compatibility problem or am I missing something ?

C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC0X(arg, 0)
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:12: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:12: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC0X(arg, 0)
^~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:36: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:836:21: note: expanded from macro '_GENERIC_MATHC0X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: variable 'type' declared as a template
_GENERIC_MATHC0X(arg, 0)
^~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:36: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:40: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:855:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:40: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC0X(imag, 0)
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:12: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:12: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC0X(imag, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:36: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:836:21: note: expanded from macro '_GENERIC_MATHC0X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: variable 'type' declared as a template
_GENERIC_MATHC0X(imag, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:36: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:40: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:856:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:838:40: note: expanded from macro '_GENERIC_MATHC0X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC1X(real, _Left)
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC1X(real, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:846:21: note: expanded from macro '_GENERIC_MATHC1X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: variable 'type' declared as a template
_GENERIC_MATHC1X(real, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:857:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC1X(norm, (_Left * _Left))
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC1X(norm, (_Left * _Left))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:846:21: note: expanded from macro '_GENERIC_MATHC1X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: variable 'type' declared as a template
_GENERIC_MATHC1X(norm, (_Left * _Left))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:874:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC1X(conj, _Left)
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC1X(conj, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:846:21: note: expanded from macro '_GENERIC_MATHC1X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: variable 'type' declared as a template
_GENERIC_MATHC1X(conj, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:876:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: expected a qualified name after 'typename'
_GENERIC_MATHC1X(proj, _Left)
^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: unknown type name '_Promote_to_float'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:12: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: definition or redeclaration of 'type' cannot
      name the global scope
_GENERIC_MATHC1X(proj, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                               ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: 'inline' can only appear on functions
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:846:21: note: expanded from macro '_GENERIC_MATHC1X'
template<class _Ty> inline \
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: variable 'type' declared as a template
_GENERIC_MATHC1X(proj, _Left)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:36: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                 ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: expected ';' at end of declaration
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:877:1: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:848:40: note: expanded from macro '_GENERIC_MATHC1X'
                typename _Promote_to_float<_Ty>::type>::type \
                                                     ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:19: error: expected a qualified name after 'typename'
        complex<typename _Common_float_type<_Ty1, _Ty2>::type>
                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:19: error: unknown type name '_Common_float_type'
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:51: error: definition or redeclaration of 'type' cannot
      name the global scope
        complex<typename _Common_float_type<_Ty1, _Ty2>::type>
                                                       ~~^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:882:14: error: 'inline' can only appear on functions
        class _Ty2> inline
                    ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:51: error: variable 'type' declared as a template
        complex<typename _Common_float_type<_Ty1, _Ty2>::type>
                                                         ^
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:55: error: expected ';' at end of declaration
        complex<typename _Common_float_type<_Ty1, _Ty2>::type>
                                                             ^
                                                             ;
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:883:55: error: expected unqualified-id
C:/PROGRA~2/EMBARC~1/Studio/19.0/include/DINKUM~2\xcomplex:893:19: error: expected a qualified name after 'typename'
        complex<typename _Common_float_type<_Ty1, _Ty2>::type>
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
51 errors generated.