Build with Embarcadero RAD Studio 11.3 Builder C++ error: use of undeclared identifier 'uintptr_t'

System information (version)
  • OpenCV => 4.7.0
  • Operating System / Platform => Windows 11 64 Bit
  • Compiler => Embarcadero C++ RAD Studio 11.3, clang compiler bcc32c
Detailed description

During compiling I got the following (first) error:

MAKE Version 5.43  Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
[  8%] Building C object 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/src/ittnotify/ittnotify_static.c.obj
Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
C:\opencv\3rdparty\ittnotify\src\ittnotify\ittnotify_static.c:
In file included from C:\opencv\3rdparty\ittnotify\src\ittnotify\ittnotify_static.c:75:
C:/opencv/3rdparty/ittnotify/include\ittnotify.h:1831:19: warning: static variable '__itt_null' is used in an inline
      function with external linkage [-Wstatic-in-inline]
    __itt_id id = __itt_null;
                  ^
C:/opencv/3rdparty/ittnotify/include\ittnotify.h:1828:1: note: use 'static' to give inline function '__itt_id_make'
      internal linkage
ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) ITT_INLINE_ATTRIBUTE;
^
static
C:/opencv/3rdparty/ittnotify/include\ittnotify.h:231:30: note: expanded from macro 'ITT_INLINE'
#define ITT_INLINE           __forceinline
                             ^
c:\program files (x86)\embarcadero\studio\22.0\include\windows\sdk\winnt.h:334:23: note: expanded from macro
      '__forceinline'
#define __forceinline __inline
                      ^
C:/opencv/3rdparty/ittnotify/include\ittnotify.h:1815:23: note: '__itt_null' declared here
static const __itt_id __itt_null = { 0, 0, 0 };
                      ^
C:/opencv/3rdparty/ittnotify/include\ittnotify.h:1832:35: error: use of undeclared identifier 'uintptr_t'
    id.d1 = (unsigned long long)((uintptr_t)addr);

related post

I added in CMake BUILD_opencv_world=ON

C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\execution_engine.cpp:
[  5%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.2a/sources/ade/source/graph.cpp.obj
Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp:
In file included from C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp:7:
In file included from C:/opencv/build/3rdparty/ade/ade-0.1.2a/sources/ade/include\ade/graph.hpp:12:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:4:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xmemory:4:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xmemory0:8:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xutility:7:
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xiter:327:13: error: base 'ElemDeleter' is marked
      'final'
                : private _Ty1
                          ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:239:31: note: in instantiation of template
      class 'std::_Compressed_pair<ade::Graph::ElemDeleter, ade::Node *, true>' requested here
        _Compressed_pair<_Dx, _Ty *> _Mypair;
                                     ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:715:21: note: in instantiation of template
      class 'std::_Ref_count_del<ade::Node, ade::Graph::ElemDeleter>' requested here
                _Resetp0(_Px, new _Ref_count_del<_Ux, _Dx>(_Px, _Dt));
                                  ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:507:3: note: in instantiation of function
      template specialization 'std::shared_ptr<ade::Node>::_Resetp<ade::Node, ade::Graph::ElemDeleter>' requested here
                _Resetp(_Px, _Dt);
                ^
C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp:35:13: note: in instantiation of function template
      specialization 'std::shared_ptr<ade::Node>::shared_ptr<ade::Node, ade::Graph::ElemDeleter>' requested here
    NodePtr node(new Node(this), ElemDeleter{});
            ^
C:/opencv/build/3rdparty/ade/ade-0.1.2a/sources/ade/include\ade/graph.hpp:123:12: note: 'ElemDeleter' declared here
    struct ElemDeleter final
           ^           ~~~~~
In file included from C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp:7:
In file included from C:/opencv/build/3rdparty/ade/ade-0.1.2a/sources/ade/include\ade/graph.hpp:12:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:4:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xmemory:4:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xmemory0:8:
In file included from c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xutility:7:
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\xiter:327:13: error: base 'ElemDeleter' is marked
      'final'
                : private _Ty1
                          ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:239:31: note: in instantiation of template
      class 'std::_Compressed_pair<ade::Graph::ElemDeleter, ade::Edge *, true>' requested here
        _Compressed_pair<_Dx, _Ty *> _Mypair;
                                     ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:715:21: note: in instantiation of template
      class 'std::_Ref_count_del<ade::Edge, ade::Graph::ElemDeleter>' requested here
                _Resetp0(_Px, new _Ref_count_del<_Ux, _Dx>(_Px, _Dt));
                                  ^
c:\program files (x86)\embarcadero\studio\22.0\include\dinkumware64\memory:507:3: note: in instantiation of function
      template specialization 'std::shared_ptr<ade::Edge>::_Resetp<ade::Edge, ade::Graph::ElemDeleter>' requested here
                _Resetp(_Px, _Dt);
                ^
C:\opencv\build\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp:174:13: note: in instantiation of function template      specialization 'std::shared_ptr<ade::Edge>::shared_ptr<ade::Edge, ade::Graph::ElemDeleter>' requested here
    EdgePtr edge(new Edge(src_node, dst_node), ElemDeleter{});
            ^
C:/opencv/build/3rdparty/ade/ade-0.1.2a/sources/ade/include\ade/graph.hpp:123:12: note: 'ElemDeleter' declared here
    struct ElemDeleter final
           ^           ~~~~~
2 errors generated.

** error 1 ** deleting CMakeFiles\ade.dir\3rdparty\ade\ade-0.1.2a\sources\ade\source\graph.cpp.obj

** error 1 ** deleting CMakeFiles\ade.dir\all

** error 1 ** deleting all

maybe you should start to (temporary) remove offending modules / 3rdparty libs:

WITH_ITT=OFF
WITH_ADE=OFF
BUILD_opencv_gapi=OFF

I added this to CMAKE, the progress reached 25% and again an error

MAKE Version 5.43  Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
[ 23%] Processing OpenCL kernels (calib3d)
[ 23%] Processing OpenCL kernels (core)
[ 24%] Processing OpenCL kernels (features2d)
[ 24%] Processing OpenCL kernels (imgproc)
[ 24%] Processing OpenCL kernels (objdetect)
[ 24%] Processing OpenCL kernels (photo)
[ 24%] Processing OpenCL kernels (stitching)
[ 24%] Processing OpenCL kernels (video)
MAKE Version 5.43  Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
[ 25%] Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/core/src/algorithm.cpp.obj
Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
C:\opencv\modules\core\src\algorithm.cpp:
In file included from C:\opencv\modules\core\src\algorithm.cpp:43:
In file included from C:\opencv\modules\core\src/precomp.hpp:88:
C:/opencv/modules/core/include\opencv2/core/hal/intrin.hpp:82:12: error: use of undeclared identifier 'llvm'
    return llvm.cttz.i32(value, true);
           ^
1 error generated.

** error 1 ** deleting modules\world\CMakeFiles\opencv_world.dir\__\core\src\algorithm.cpp.obj

** error 1 ** deleting modules\world\CMakeFiles\opencv_world.dir\all

** error 1 ** deleting all

I do according to the instructions from this page

https://github.com/IgorYunusov/OpenCV-RS

this is for 3.2, and 5 years old (unmaintained …)

I use the instruction only to configure CMake.

OpenCV I am using the latest version 4.7.0
Rad Studio is also the newest 11.3 (clang compiler bcc32c.exe)
CMake 3.27.0-rc2

The default settings in CMake I changed like this:

disable options:
WITH_WEBP
WITH_JASPER
WITH_IPP
WITH_OPENEXR
BUILD_TESTS
BUILD_PERF_TESTS
BUILD_SHARED_LIBS

and disable options:
WITH_ITT
WITH_ADE
BUILD_opencv_gapi

Enable options:
OPENCV_ENABLE_NONFREE
BUILD_opencv_world

new configure project.

After configarutation, find and disable options:

BUILD_PROTOBUF
BUILD_opencv_dnn
BUILD_TIFF
WITH_TIFF

I don’t know if this is ideal but I also got those errors and added headers or commented out the place the error occurred. Here is my list of all the fixes I applied:

error: use of undeclared identifier ‘uintptr_t’ = add #include in …\opencv-4.7.0\3rdparty\ittnotify\include\ittnotify.h

error: use of undeclared identifier ‘lrintf’ = add #include <math.h> in …/opencv-4.7.0/modules/core/include\opencv2/core/fast_math.hpp

error: unknown type name ‘FILE’ = add #include <stdio.h> in …/opencv-4.7.0/modules/core/include\opencv2/core/operations.hpp

error: use of undeclared identifier ‘llvm’ = comment it out and make it return 0; instead in …/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp

error: token is not a valid binary operator in a preprocessor subexpression in #if (i64_fromNaN != i64_fromPosOverflow) || (i64_fromNaN != i64_fromNegOverflow) = comment out:
#if (i64_fromNaN != i64_fromPosOverflow) || (i64_fromNaN != i64_fromNegOverflow)
if ((exp == 0x7FF) && sig) {
#if (i64_fromNaN == i64_fromPosOverflow)
sign = 0;
#elif (i64_fromNaN == i64_fromNegOverflow)
sign = 1;
#else
raiseFlags(flag_invalid);
return i64_fromNaN;
#endif
}
#endif in …\opencv-4.7.0\modules\core\src\softfloat.cpp

when errors: error: use of undeclared identifier ‘fabsf’ add:

#include <stdio.h>
#include <math.h>
#include <float.h>
#include <errno.h>
#include <fenv.h>

using namespace std;

error: conversion from ‘(anonymous namespace)::fixedpoint64’ to ‘signed char’ is ambiguous = comment out lines containing ‘dst[i]’ in …\opencv-4.7.0\modules\imgproc\src\resize.cpp

error: use of undeclared identifier ‘_beginthread’ = comment out the line containing ‘_beginthread’ in …\opencv-4.7.0\modules\videoio\src\cap_dshow.cpp

Please write in more detail where you copy this file or where you make changes.
I want to check it out

For that one you need to add #include <cstdint> to the file ittnotify.h in the opencv folder you are using. For the rest of them you need to apply the changes I gave you in the files that I specified for example:
…\opencv-4.7.0\modules\videoio\src\cap_dshow.cpp

Thanks ! Now I will try to do this

It really works, errors

C:/opencv/3rdparty/ittnotify/include\ittnotify.h:1832:35: error: use of undeclared identifier 'uintptr_t'
    id.d1 = (unsigned long long)((uintptr_t)addr);

not anymore !
Great!

Let’s move on…

here are a lot of mistakes -
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse_em.hpp

How to fix it ?

Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
C:\opencv-4.7.0\modules\core\src\arithm.cpp:
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1585:1: error: always_inline function
      '_mm_loadu_si128' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint8x16, uchar)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1555:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \
                ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1585:1: error: always_inline function
      '_mm_storeu_si128' requires target feature 'sse', but would be inlined into function 'v_store' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1566:3: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ _mm_storeu_si128((__m128i*)ptr, a.val); } \
  ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1041:1: error: always_inline function
      '_mm_and_si128' requires target feature 'sse', but would be inlined into function 'operator&' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint8x16, si128, _mm_set1_epi32(-1))
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1033:43: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOGIC_OP'
    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \
                                          ^
<scratch space>:147:1: note: expanded from here
_mm_and_si128
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_set1_epi8' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint8x16, v_int8x16, epi8, (char)-128)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1218:21: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i smask = _mm_set1_##suffix(sbit); \
                    ^
<scratch space>:3:1: note: expanded from here
_mm_set1_epi8
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1219:24: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i not_mask = _mm_set1_epi32(-1); \
                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_cmpgt_epi8' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:19: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                  ^
<scratch space>:4:1: note: expanded from here
_mm_cmpgt_epi8
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:38: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                                     ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:67: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                                                                  ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1221:20: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpuvec(_mm_xor_si128(res, not_mask)); \
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1586:1: error: always_inline function
      '_mm_loadu_si128' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int8x16, schar)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1555:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \
                ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1586:1: error: always_inline function
      '_mm_storeu_si128' requires target feature 'sse', but would be inlined into function 'v_store' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1566:3: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ _mm_storeu_si128((__m128i*)ptr, a.val); } \
  ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1042:1: error: always_inline function
      '_mm_and_si128' requires target feature 'sse', but would be inlined into function 'operator&' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int8x16, si128, _mm_set1_epi32(-1))
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1033:43: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOGIC_OP'
    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \
                                          ^
<scratch space>:154:1: note: expanded from here
_mm_and_si128
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint8x16, v_int8x16, epi8, (char)-128)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1238:24: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i not_mask = _mm_set1_epi32(-1); \
                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:20: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1242:1: error: always_inline function
      '_mm_cmpgt_epi8' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:34: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                                 ^
<scratch space>:8:1: note: expanded from here
_mm_cmpgt_epi8
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1587:1: error: always_inline function
      '_mm_loadu_si128' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_uint16x8, ushort)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1555:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \
                ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:403:21: error: always_inline function
      '_mm_set1_epi16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
    __m128i delta = _mm_set1_epi16(255);
                    ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:404:23: error: always_inline function
      '_mm_packus_epi16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
    return v_uint8x16(_mm_packus_epi16(_mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta)),
                      ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:404:40: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
    return v_uint8x16(_mm_packus_epi16(_mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta)),
                                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:404:62: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
    return v_uint8x16(_mm_packus_epi16(_mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta)),
                                                             ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:405:40: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
                                       _mm_subs_epu16(b.val, _mm_subs_epu16(b.val, delta))));
                                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:405:62: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
                                       _mm_subs_epu16(b.val, _mm_subs_epu16(b.val, delta))));
                                                             ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1043:1: error: always_inline function
      '_mm_and_si128' requires target feature 'sse', but would be inlined into function 'operator&' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOGIC_OP(v_uint16x8, si128, _mm_set1_epi32(-1))
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1033:43: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOGIC_OP'
    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \
                                          ^
<scratch space>:161:1: note: expanded from here
_mm_and_si128
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_set1_epi16' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint16x8, v_int16x8, epi16, (short)-32768)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1218:21: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i smask = _mm_set1_##suffix(sbit); \
                    ^
<scratch space>:19:1: note: expanded from here
_mm_set1_epi16
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1219:24: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i not_mask = _mm_set1_epi32(-1); \
                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_cmpgt_epi16' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:19: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                  ^
<scratch space>:20:1: note: expanded from here
_mm_cmpgt_epi16
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:38: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                                     ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1220:67: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i res = _mm_cmpgt_##suffix(_mm_xor_si128(b.val, smask), _mm_xor_si128(a.val, smask)); \
                                                                  ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1221:20: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpuvec(_mm_xor_si128(res, not_mask)); \
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1588:1: error: always_inline function
      '_mm_loadu_si128' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int16x8, short)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1555:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \
                ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:455:20: error: always_inline function
      '_mm_packs_epi16' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
{ return v_int8x16(_mm_packs_epi16(a.val, b.val)); }
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1044:1: error: always_inline function
      '_mm_and_si128' requires target feature 'sse', but would be inlined into function 'operator&' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int16x8, si128, _mm_set1_epi32(-1))
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1033:43: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOGIC_OP'
    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \
                                          ^
<scratch space>:168:1: note: expanded from here
_mm_and_si128
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint16x8, v_int16x8, epi16, (short)-32768)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1238:24: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i not_mask = _mm_set1_epi32(-1); \
                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:20: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1243:1: error: always_inline function
      '_mm_cmpgt_epi16' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:34: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                                 ^
<scratch space>:24:1: note: expanded from here
_mm_cmpgt_epi16
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1590:1: error: always_inline function
      '_mm_loadu_si128' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(v_int32x4, int)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1555:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP'
{ return _Tpvec(_mm_loadu_si128((const __m128i*)ptr)); } \
                ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:410:21: error: always_inline function
      '_mm_set1_epi16' requires target feature 'sse', but would be inlined into function 'v_pack_store' that is compiled
      without support for 'sse'
    __m128i delta = _mm_set1_epi16(255);
                    ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:411:18: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack_store' that is compiled
      without support for 'sse'
    __m128i a1 = _mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta));
                 ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:411:40: error: always_inline function
      '_mm_subs_epu16' requires target feature 'sse', but would be inlined into function 'v_pack_store' that is compiled
      without support for 'sse'
    __m128i a1 = _mm_subs_epu16(a.val, _mm_subs_epu16(a.val, delta));
                                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:412:5: error: always_inline function
      '_mm_storel_epi64' requires target feature 'sse', but would be inlined into function 'v_pack_store' that is
      compiled without support for 'sse'
    _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a1, a1));
    ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:412:37: error: always_inline function
      '_mm_packus_epi16' requires target feature 'sse', but would be inlined into function 'v_pack_store' that is
      compiled without support for 'sse'
    _mm_storel_epi64((__m128i*)ptr, _mm_packus_epi16(a1, a1));
                                    ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:578:20: error: always_inline function
      '_mm_packs_epi32' requires target feature 'sse', but would be inlined into function 'v_pack' that is compiled
      without support for 'sse'
{ return v_int16x8(_mm_packs_epi32(a.val, b.val)); }
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1046:1: error: always_inline function
      '_mm_and_si128' requires target feature 'sse', but would be inlined into function 'operator&' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_LOGIC_OP(v_int32x4, si128, _mm_set1_epi32(-1))
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1033:43: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOGIC_OP'
    OPENCV_HAL_IMPL_SSE_BIN_OP(&, _Tpvec, _mm_and_##suffix) \
                                          ^
<scratch space>:182:1: note: expanded from here
_mm_and_si128
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1244:1: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
OPENCV_HAL_IMPL_SSE_INT_CMP_OP(v_uint32x4, v_int32x4, epi32, (int)0x80000000)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1238:24: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    __m128i not_mask = _mm_set1_epi32(-1); \
                       ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1244:1: error: always_inline function
      '_mm_xor_si128' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:20: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                   ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1244:1: error: always_inline function
      '_mm_cmpgt_epi32' requires target feature 'sse', but would be inlined into function 'operator>=' that is compiled
      without support for 'sse'
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1239:34: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_INT_CMP_OP'
    return _Tpsvec(_mm_xor_si128(_mm_cmpgt_##suffix(b.val, a.val), not_mask)); \
                                 ^
<scratch space>:40:1: note: expanded from here
_mm_cmpgt_epi32
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:217:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1630:1: error: always_inline function
      '_mm_loadu_ps' requires target feature 'sse', but would be inlined into function 'v_load' that is compiled without
      support for 'sse'
OPENCV_HAL_IMPL_SSE_LOADSTORE_FLT_OP(v_float32x4, float, ps)
^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse.hpp:1596:17: note: expanded from macro
      'OPENCV_HAL_IMPL_SSE_LOADSTORE_FLT_OP'
{ return _Tpvec(_mm_loadu_##suffix(ptr)); } \
                ^
<scratch space>:80:1: note: expanded from here
_mm_loadu_ps
^
In file included from C:\opencv-4.7.0\modules\core\src\arithm.cpp:50:
In file included from C:\opencv-4.7.0\modules\core\src/precomp.hpp:88:
In file included from C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp:216:
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse_em.hpp:147:23: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function '_v128_packs_epu32' that is
      compiled without support for 'sse'
    const __m128i m = _mm_set1_epi32(65535);
                      ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse_em.hpp:153:23: error: always_inline function
      '_mm_set1_epi32' requires target feature 'sse', but would be inlined into function '_v128_packs_epu32' that is
      compiled without support for 'sse'
    const __m128i d = _mm_set1_epi32(32768), nd = _mm_set1_epi16(-32768);
                      ^
C:/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin_sse_em.hpp:153:51: error: always_inline function
      '_mm_set1_epi16' requires target feature 'sse', but would be inlined into function '_v128_packs_epu32' that is
      compiled without support for 'sse'
    const __m128i d = _mm_set1_epi32(32768), nd = _mm_set1_epi16(-32768);
                                                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
51 errors generated.

** error 1 ** deleting modules\world\CMakeFiles\opencv_world.dir\__\core\src\arithm.cpp.obj

** error 1 ** deleting modules\world\CMakeFiles\opencv_world.dir\all

** error 1 ** deleting all

C:\opencv-4.7.0\build>

I don’t get the same error but this maybe a solution.

unfortunately it didn’t help

Hello everyone.
I read that the LIB file is not needed to import DLL into x64 applications.
It is enough to convert to the ELF format (file) and add it as a Static Libraries File (.a) to the project.

MKEXP.EXE, the 64-bit Windows Import Library Tool for C++

Has anyone tried to do it this way?
Does anyone have any experience ?

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/MKEXP.EXE,_the_64-bit_Windows_Import_Library_Tool_for_C%2B%2B

Hi @Acronis ,
Did you solve this issue?

I’d appreciate any pointers for opencv build for rad studio.

Thanks!

please choose a different compiler / toolchain

Thanks for the suggestion, I will try it out.

By different toolchain, do you mean not bcc32c.exe (32 bit) but different ones?