使用64位版本的MVSC2019从源OpenCV编译时出现问题



我在2019 64位版本中使用MSVC为带有Qt的windows编译openCV。

在启动第一个配置时,我得到了一个错误列表,如下所示:

Check size of size_t
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile):
Cannot copy output executable
''
to destination specified by COPY_FILE:
'C:/Users/alejandro/Downloads/opencv/build/CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.bin'
Recorded try_compile output location doesn't exist:
C:/Users/alejandro/Downloads/opencv/build/CMakeFiles/CMakeScratch/TryCompile-jglvcw/Debug/cmTC_e9d0b.exe
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl)
3rdparty/libjpeg-turbo/CMakeLists.txt:25 (check_type_size)

有人知道我该怎么解决这个问题吗?

编辑1

我已经看到另一个重要的错误是这个与OpenMP有关的错误:

CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindOpenMP.cmake:420 (try_compile):
Cannot copy output executable
''
to destination specified by COPY_FILE:
'C:/Users/alejandro/Downloads/opencv/build/CMakeFiles/FindOpenMP/ompver_C.bin'
Recorded try_compile output location doesn't exist:
C:/Users/alejandro/Downloads/opencv/build/CMakeFiles/CMakeScratch/TryCompile-q8quzk/Debug/cmTC_e2ecd.exe
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.25/Modules/FindOpenMP.cmake:560 (_OPENMP_GET_SPEC_DATE)
C:/Program Files/CMake/share/cmake-3.25/Modules/FindBLAS.cmake:768 (find_package)
C:/Program Files/CMake/share/cmake-3.25/Modules/FindLAPACK.cmake:247 (find_package)
C:/Program Files/CMake/share/cmake-3.25/Modules/FindLAPACK.cmake:283 (_lapack_find_dependency)
cmake/OpenCVFindLAPACK.cmake:176 (find_package)
CMakeLists.txt:733 (include)

我也遇到了同样的问题,这是CMake-3.25.0-rc2故障,将其更改为3.24.2,它就会工作。

最新更新