# CMAKE error while building OPENCV4.5

**URL:** <https://forum.opencv.org/t/cmake-error-while-building-opencv4-5/10657>\
**Category:** C++\
**Tags:** windows, cmake, openmp, build\
**Created:** [October 24, 2022, 10:13am UTC](https://forum.opencv.org/t/cmake-error-while-building-opencv4-5/10657 "2022-10-24T10:13:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_t](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/s_t/32/6158_2.png) [@s\_t](https://forum.opencv.org/u/s_t)\
**Post date:** [October 24, 2022, 10:13am UTC](https://forum.opencv.org/t/cmake-error-while-building-opencv4-5/10657/1 "2022-10-24T10:13:22Z")

</div>

I am facing following error while using cmake to generate the opencv solution.

OS : Windows 10  
Opencv + contrib : 4.5  
VS 2019  
CMAKE 3.25

```auto
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:

    'E:/PedWelder/opencv-4.5.5/build/CMakeFiles/FindOpenMP/ompver_C.bin'

  Recorded try_compile output location doesn't exist:

    E:/PedWelder/opencv-4.5.5/build/CMakeFiles/CMakeScratch/TryCompile-gjuy7q/Debug/cmTC_dfd39.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)

```

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [October 24, 2022, 10:51am UTC](https://forum.opencv.org/t/cmake-error-while-building-opencv4-5/10657/2 "2022-10-24T10:51:29Z")

</div>

solution:

> <https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version>

I found that by googling for the first couple of lines of the error output.

> [@s\_t](#):
>
> CMAKE 3.25

that is _not_ a release yet, just a release _candidate_.

please note that _forward_ ticks (´´´) do not work to style code. you need to use backticks (```) on _both_ ends.
