在mingw32中编译OpenCV 4.0.0a并收到错误:在此范围内未声明'convertFp16SW'

时间:2018-10-15 23:06:53

标签: qt opencv cmake mingw32

我正在遵循this指南来安装OpenCV 4.0.0a以与Qt一起使用。我收到以下错误:

C:\opencv-build>mingw32-make -j 8
[  2%] Built target zlib
[  3%] Built target gen-pkgconfig
[  6%] Built target libjasper
[  6%] Built target gen_opencv_python_source
[ 10%] Built target libjpeg-turbo
[ 19%] Built target libwebp
[ 25%] Built target libprotobuf
[ 26%] Built target libpng
[ 29%] Built target libtiff
[ 34%] Built target IlmImf
[ 35%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/convert.fp16.cpp.obj
C:\opencv\sources\modules\core\src\convert.fp16.cpp: In function 'void cv::opt_FP16::cvtScaleHalf_SIMD32f16f(const float*, size_t, short int*, size_t, cv::Size)':
C:\opencv\sources\modules\core\src\convert.fp16.cpp:16:6: warning: no previous declaration for 'void cv::opt_FP16::cvtScaleHalf_SIMD32f16f(const float*, size_t, short int*, size_t, cv::Size)' [-Wmissing-declarations]
 void cvtScaleHalf_SIMD32f16f( const float* src, size_t sstep, short* dst, size_t dstep, cv::Size size )
      ^
C:\opencv\sources\modules\core\src\convert.fp16.cpp:38:42: error: 'convertFp16SW' was not declared in this scope
             dst[x] = convertFp16SW(src[x]);
                                          ^
C:\opencv\sources\modules\core\src\convert.fp16.cpp: In function 'void cv::opt_FP16::cvtScaleHalf_SIMD16f32f(const short int*, size_t, float*, size_t, cv::Size)':
C:\opencv\sources\modules\core\src\convert.fp16.cpp:43:6: warning: no previous declaration for 'void cv::opt_FP16::cvtScaleHalf_SIMD16f32f(const short int*, size_t, float*, size_t, cv::Size)' [-Wmissing-declarations]
 void cvtScaleHalf_SIMD16f32f( const short* src, size_t sstep, float* dst, size_t dstep, cv::Size size )
      ^
C:\opencv\sources\modules\core\src\convert.fp16.cpp:64:42: error: 'convertFp16SW' was not declared in this scope
             dst[x] = convertFp16SW(src[x]);
                                          ^
modules\core\CMakeFiles\opencv_core.dir\build.make:1237: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/convert.fp16.cpp.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/convert.fp16.cpp.obj] Error 1
CMakeFiles\Makefile2:1683: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

我已经在线搜索了此问题的解决方案。我尝试取消选中ENABLE_PRECOMPILED_HEADERS,但这没有帮助。我是同时使用CMake和OpenCV的新手。任何建议将不胜感激。

0 个答案:

没有答案