91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

win10下cmake編譯Android opencv庫問題

發布時間:2020-07-29 06:44:32 來源:網絡 閱讀:3235 作者:cfy10 欄目:移動開發

win10下cmake編譯opencv庫問題

1.未配置Android NDK工具鏈目錄

CMake Error at platforms/android/android.toolchain.cmake:451 (message):
Could not find neither Android NDK nor Android standalone toolchain.

You should either set an environment variable:
export ANDROID_NDK=~/my-android-ndk

根據提示配置ANDROID_NDK到環境變量PATH中,即可
例如:ANDROID_NDK = D:\android-ndk-r14b


2.ndk版本不匹配。

CMake Error at cmake/OpenCVUtils.cmake:235 (TRY_COMPILE):
Failed to configure test project build system.
Call Stack (most recent call first):
cmake/OpenCVUtils.cmake:296 (ocv_check_compiler_flag)
cmake/OpenCVCompilerOptions.cmake:69 (ocv_check_flag_support)
cmake/OpenCVCompilerOptions.cmake:93 (add_extra_compiler_option)
CMakeLists.txt:495 (include)

發現這個問題時,先是使用Android Studio中鏈接下載的最新ndk目錄(版本是17)。會報錯
之后,從https://developer.android.google.cn/ndk/downloads/ 中下載最新的16b,還是報錯。

最后 查看源碼文件夾下opencv-3.2.0\platforms\android\android.toolchain.cmake文件里有兩行注釋

Android CMake toolchain file, for use with the Android NDK r5-r10d
Requires cmake 2.6.3 or newer (2.8.9 or newer is recommended).

提示使用r5到r10版本的NDK(我去網上下只剩r10e的,下載來編譯后就可以通過了。)


3.下載依賴文件超時,未下載成功。比對hash碼不匹配

CMake Error at D:/opencv/opencv-3.2.0/cmake/OpenCVUtils.cmake:1043 (file):
file DOWNLOAD HASH mismatch

for file: [D:/opencv/opencv_contrib-3.2.0/modules/dnn/.download/bd5e3eed635a8d32e2b99658633815ef/v3.1.0/protobuf-cpp-3.1.0.tar.gz]
  expected hash: [bd5e3eed635a8d32e2b99658633815ef]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]
         status: [28;"Timeout was reached"]

Call Stack (most recent call first):
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/download_protobuf.cmake:23 (ocv_download)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/download_protobuf.cmake:51 (ocv_protobuf_download)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:30 (include)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/CMakeLists.txt:35 (include)

CMake Error at D:/opencv/opencv-3.2.0/cmake/OpenCVUtils.cmake:1047 (message):
Failed to download v3.1.0/protobuf-cpp-3.1.0.tar.gz. Status=28;"Timeout
was reached"
Call Stack (most recent call first):
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/download_protobuf.cmake:23 (ocv_download)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/download_protobuf.cmake:51 (ocv_protobuf_download)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:30 (include)
D:/opencv/opencv_contrib-3.2.0/modules/dnn/CMakeLists.txt:35 (include)

根據提示D:/opencv/opencv_contrib-3.2.0/modules/dnn/cmake/download_protobuf.cmake:23
找到該行信息
可以看出,他需要libprotobuf這個庫,并且需要下載到 ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/protobuf/sources 目錄下,而下載地址就是 https://github.com/google/protobuf/releases ,于是我們只要手動下載3.1.0,然后把文件放到這個目錄下即可。
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

曲阳县| 庆元县| 长治县| 花莲县| 蚌埠市| 上虞市| 肥东县| 抚顺县| 密云县| 肥乡县| 察隅县| 乐至县| 朝阳县| 陇西县| 榆树市| 镇远县| 万荣县| 靖安县| 元谋县| 维西| 南乐县| 寻甸| 扬州市| 钟祥市| 即墨市| 云霄县| 开化县| 五指山市| 大厂| 哈巴河县| 双桥区| 竹山县| 湘潭市| 武鸣县| 惠东县| 濉溪县| 永和县| 桂东县| 宣武区| 沅陵县| 万山特区|