OpenCV __int128 error when compiling for 64 bit

I tried to compile opencv for x86_64 and arm64-v8a, but it threw error below:

In file included 
from D:\AndroidSDK\android-ndk-r17b\sources\cxx-stl\gnu-libstdc++\4.9\include/bits/stl_algo.h:59:0,
from D:\AndroidSDK\android-ndk-r17b\sources\cxx-stl\gnu-libstdc++\4.9\include/algorithm:62,
from D:\TMP\C++\OpenCV-Source\opencv-3.4.3\modules\core\include/opencv2/core/base.hpp:55,
from D:\TMP\C++\OpenCV-Source\opencv-3.4.3\modules\core\include/opencv2/core.hpp:54,
from D:\TMP\C++\OpenCV-Source\opencv-3.4.3\modules\core\include/opencv2/core/utility.hpp:56,
from D:\TMP\C++\OpenCV-Source\opencv-3.4.3\modules\core\src\precomp.hpp:49,
from D:\TMP\C++\OpenCV-Source\opencv-3.4.3\modules\core\src\algorithm.cpp:43:
D:\AndroidSDK\android-ndk-r17b\sources\cxx-stl\gnu- 
libstdc++\4.9\include/cstdlib:178:10: error: expected unqualified-id before 
'__int128'
inline __int128
D:\AndroidSDK\android-ndk-r17b\sysroot\usr\include\aarch64-linux- 
android/asm/sigcontext.h:40:3: error: '__uint128_t' does not name a type
__uint128_t vregs[32];

How to solve it?

Upvotes: 1

Views: 636

Answers (1)

Wout_bb
Wout_bb

Reputation: 455

It seems to be a problem with the stl library. You could try changing the stl in CMAKE to c++ static:

Flag: ANDROID_STL Value: c++_static

Upvotes: 2

Related Questions