编译64位时出现OpenCV __int128错误

问题描述 投票:0回答:1

我试图为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];

怎么解决?

opencv 64-bit mingw
1个回答
2
投票

这似乎是stl库的一个问题。您可以尝试将CMAKE中的stl更改为c ++ static:

国旗:ANDROID_STL价值:c++_static

© www.soinside.com 2019 - 2024. All rights reserved.