0

This is reported in the Output Window in VS Community:

13>   Creating library ../opencv/build/lib/Release/opencv_core430.lib and object ../opencv/build/lib/Release/opencv_core430.exp
22>filters_utils.c
22>huffman_encode_utils.c
22>huffman_utils.c
22>quant_levels_dec_utils.c
22>quant_levels_utils.c
22>random_utils.c
22>rescaler_utils.c
22>thread_utils.c
22>utils.c
13>hal_internal.obj : error LNK2019: unresolved external symbol cblas_sgemm referenced in function "int __cdecl lapack_gemm<float>(float const *,unsigned __int64,float const *,unsigned __int64,float,float const *,unsigned __int64,float,float *,unsigned __int64,int,int,int,int)" (??$lapack_gemm@M@@YAHPEBM_K01M01MPEAM1HHHH@Z)
13>hal_internal.obj : error LNK2019: unresolved external symbol cblas_dgemm referenced in function "int __cdecl lapack_gemm<float>(float const *,unsigned __int64,float const *,unsigned __int64,float,float const *,unsigned __int64,float,float *,unsigned __int64,int,int,int,int)" (??$lapack_gemm@M@@YAHPEBM_K01M01MPEAM1HHHH@Z)
13>hal_internal.obj : error LNK2019: unresolved external symbol cblas_cgemm referenced in function "int __cdecl lapack_gemm_c<float>(float const *,unsigned __int64,float const *,unsigned __int64,float,float const *,unsigned __int64,float,float *,unsigned __int64,int,int,int,int)" (??$lapack_gemm_c@M@@YAHPEBM_K01M01MPEAM1HHHH@Z)
13>hal_internal.obj : error LNK2019: unresolved external symbol cblas_zgemm referenced in function "int __cdecl lapack_gemm_c<float>(float const *,unsigned __int64,float const *,unsigned __int64,float,float const *,unsigned __int64,float,float *,unsigned __int64,int,int,int,int)" (??$lapack_gemm_c@M@@YAHPEBM_K01M01MPEAM1HHHH@Z)
13>..\opencv\build\bin\Release\opencv_core430.dll : fatal error LNK1120: 4 unresolved externals
13>Done building project "opencv_core.vcxproj" -- FAILED.

This is from the error window in VS Community: This is from the error window in VS Community

tks.tman
  • 414
  • 6
  • 16
  • Looks like you are missing a dependency on lapack. [http://www.netlib.org/lapack/explore-html/db/d66/cblas__sgemm_8c.html](http://www.netlib.org/lapack/explore-html/db/d66/cblas__sgemm_8c.html) – drescherjm Jun 06 '20 at 23:57
  • You are trying to compile OpenCV with CUDA when it can't find the libraries on your computer. – rayryeng Jun 07 '20 at 03:45
  • @drescherjm how am missing the dependency when I downloaded opencv from source and open cv contrib from github which should have all dependencies? – tks.tman Jun 08 '20 at 12:37
  • @rayryeng I have made sure With CUDA was not selected and I am not using CUDA at all. CUDA isn't even installed on the machine. – tks.tman Jun 08 '20 at 12:40
  • Usually large open source projects like this do not include all the dependencies because the dependencies are other open source projects which are developed independently. You probably can turn off this dependency when configuring with CMake. With this said its somewhat surprising to me that CMake did not complain in the configure stage about the missing dependency. The build process should have failed before you generated project files instead of while building because of the missing dependency. – drescherjm Jun 08 '20 at 12:40
  • My mistake, `cblas` does not stand for CUDA BLAS, but the actual C-BLAS routines. There's a dependency with LAPACK that is missing. Perhaps try: https://stackoverflow.com/questions/40134261/building-opencv-3-1-on-windows-where-do-i-specify-the-lapack-library-location ? – rayryeng Jun 08 '20 at 16:03
  • Do you fix it.??? – Jess Yuan Feb 26 '22 at 08:34

0 Answers0