我试图为x86_64和arm64-v8a编译opencv,但是它在下面抛出了错误:
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];
如何解决?
答案 0 :(得分:2)
stl库似乎有问题。您可以尝试将CMAKE中的stl更改为c ++ static:
标志:ANDROID_STL
值:c++_static