为java构建带有额外模块的opencv 4.5.0失败

carvr3hs  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(410)

使用cmake3.19.1和visualstudio2013构建带有额外模块的opencv4.5.0已经花了很长时间了,但是我的问题出在vs上,我得到了大约2000个错误和警告,我不知道是什么原因,一些c++错误和其他错误
这是我的cmake结果

Detected processor: AMD64
Could NOT find PythonInterp: Found unsuitable version "2.7", but required is at least "3.2" (found C:/Users/Mini/AppData/Local/Programs/Python/Python38-32/python.exe)
Performing Test HAVE_CPU_BASELINE_FLAGS
Performing Test HAVE_CPU_BASELINE_FLAGS - Success
libjpeg-turbo: VERSION = 2.0.5, BUILD = opencv-4.5.0-libjpeg-turbo
Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
OpenJPEG: VERSION = 2.3.1, BUILD = opencv-4.5.0-openjp2-2.3.1
OpenJPEG libraries will be built from sources: libopenjp2 (version "2.3.1")
found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
at: C:/Users/Mini/Downloads/newbuild8/3rdparty/ippicv/ippicv_win/icv
found Intel IPP Integration Wrappers sources: 2020.0.0
at: C:/Users/Mini/Downloads/newbuild8/3rdparty/ippicv/ippicv_win/iw
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
Could NOT find LAPACK (missing: LAPACK_LIBRARIES) 
    Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

Found apache ant: C:/apache-ant-1.10.9-bin/apache-ant-1.10.9/bin/ant.bat (1.10.9)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: C:/Users/Mini/Downloads/newbuild8/python_loader
Module opencv_alphamat disabled because the following dependencies are not found: Eigen
Caffe:   NO
Protobuf:   NO
Glog:   NO
freetype2:   NO
harfbuzz:    NO
Julia not found. Not compiling Julia Bindings. 
Module opencv_ovis disabled because OGRE3D was not found
No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Allocator metrics storage type: 'long long'
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse3.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.ssse3.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_1.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.fp16.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx512_skx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx512_skx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin512.avx512_skx.cpp
Excluding from source files list: modules/imgproc/src/corner.avx.cpp
Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/Users/Mini/Downloads/opencv-4.5.0/opencv-4.5.0/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx2.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Excluding from source files list: modules/features2d/src/fast.avx2.cpp

General configuration for OpenCV 4.5.0 =====================================
  Version control:               unknown

  Extra modules:
    Location (extra):            C:/Users/Mini/Downloads/opencv_contrib-4.5.0/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2020-12-05T11:26:33Z
    Host:                        Windows 6.1.7601 AMD64
    CMake:                       3.19.1
    CMake generator:             Visual Studio 12 2013
    CMake build tool:            C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe
    MSVC:                        1800

  CPU/HW features:
    Baseline:

  C/C++:
    Built as dynamic libs?:      NO
    C++ standard:                11
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe  (ver 18.0.21005.1)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MT /O2 /Ob2 /DNDEBUG 
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MTd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise  /MP   /MT /O2 /Ob2 /DNDEBUG 
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise  /MP /MTd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO  /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib
    Linker flags (Debug):        /machine:x64  /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL  /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          ade wsock32 comctl32 gdi32 ole32 setupapi ws2_32
    3rdparty dependencies:       ittnotify libprotobuf zlib libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf quirc ippiw ippicv

  OpenCV modules:
    To be built:                 aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform java line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 alphamat cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf js julia matlab ovis python2 python3 sfm viz
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  Windows RT support:            NO

  GUI: 
    Win32 UI:                    YES
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        build-libjpeg-turbo (ver 2.0.5-62)
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.0.10)
    JPEG 2000:                   build (ver 2.3.1)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.91.100)
      avformat:                  YES (58.45.100)
      avutil:                    YES (56.51.100)
      swscale:                   YES (5.7.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES
    Media Foundation:            YES
      DXVA:                      NO

  Parallel framework:            Concurrency

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2020.0.0 Gold [2020.0.0]
           at:                   C:/Users/Mini/Downloads/newbuild8/3rdparty/ippicv/ippicv_win/icv
    Intel IPP IW:                sources (2020.0.0)
              at:                C:/Users/Mini/Downloads/newbuild8/3rdparty/ippicv/ippicv_win/iw
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (NVD3D11)
    Include path:                C:/Users/Mini/Downloads/opencv-4.5.0/opencv-4.5.0/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            C:/Users/Mini/AppData/Local/Programs/Python/Python38-32/python.exe

  Java:                          export all functions
    ant:                         C:/apache-ant-1.10.9-bin/apache-ant-1.10.9/bin/ant.bat (ver 1.10.9)
    JNI:                         C:/Program Files (x86)/Java/jdk-15/include C:/Program Files (x86)/Java/jdk-15/include/win32 C:/Program Files (x86)/Java/jdk-15/include
    Java wrappers:               YES
    Java tests:                  YES

  Install to:                    C:/Users/Mini/Downloads/newbuild8/install
-----------------------------------------------------------------

Configuring done
Generating done

下面是我在vsvs中遇到的一些错误

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题