Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
116 Views

Building custom MKL dll, unresolved external symbols

Jump to solution

Building a custom MKL dll using Visual studio 2019 and MKL 2020 update 2. The example solution builds fine.

I edited the list of functions in example.def to my list of application unresolved symbols, as described in the MKL doc. I changed the Linker->Input Additional Dependencies from mkl_intel_lp64.lib to mkl_intel_ilp64.lib.

Building now gives me two unresolved external symbols. Here are the error outputs:

Error	LNK2019	unresolved external symbol _FDtest referenced in function "protected: void __cdecl mkl_blas_jit_gemm_t<class std::complex<float>,struct mkl_serv_Xbyak::Reg64>::gemm(struct mkl_blas_jit_gemm_strategy &,struct mkl_blas_jit_gemm_state &,bool)" (?gemm@?$mkl_blas_jit_gemm_t@V?$complex@M@std@@UReg64@mkl_serv_Xbyak@@@@IEAAXAEAUmkl_blas_jit_gemm_strategy@@AEAUmkl_blas_jit_gemm_state@@_N@Z)	lp64_parallel	C:\Users\John\Documents\Development\Igor9\CustomMKLDll\lp64_parallel\mkl_core.lib(_jit_gemm_kernel_generator_fb.obj)	1	
Error	LNK2019	unresolved external symbol _Dtest referenced in function "protected: void __cdecl mkl_blas_jit_gemm_t<class std::complex<double>,struct mkl_serv_Xbyak::Reg64>::gemm(struct mkl_blas_jit_gemm_strategy &,struct mkl_blas_jit_gemm_state &,bool)" (?gemm@?$mkl_blas_jit_gemm_t@V?$complex@N@std@@UReg64@mkl_serv_Xbyak@@@@IEAAXAEAUmkl_blas_jit_gemm_strategy@@AEAUmkl_blas_jit_gemm_state@@_N@Z)	lp64_parallel	C:\Users\John\Documents\Development\Igor9\CustomMKLDll\lp64_parallel\mkl_core.lib(_jit_gemm_kernel_generator_fb.obj)	1	
Error	LNK1120	2 unresolved externals	lp64_parallel	C:\Users\John\Documents\Development\Igor9\CustomMKLDll\x64\Debug\CustomMKL64d.dll	1	

_Dtest and _FDtest are part of the Visual C runtime, so surely one of these additional dependencies has those functions:

mkl_intel_ilp64.lib;mkl_intel_thread.lib;mkl_core.lib;libiomp5md.lib;msvcrt.lib;vcruntime.lib;ucrt.lib;kernel32.lib;user32.lib

Naturally, the mkl_xxx libraries are irrelevant; that's just the complete list. I would have expected ucrt.lib to have those symbols, though.

I tried Googling those symbols- I can get documentation, but not a mention of what library to include.

Any insights appreciated!

Labels (1)
0 Kudos

Accepted Solutions
Highlighted
Black Belt
104 Views

The missing symbols are to be found in the C++ runtime libraries (msvcprt.lib, libcpmt.lib, etc.). 

View solution in original post

2 Replies
Highlighted
Black Belt
105 Views

The missing symbols are to be found in the C++ runtime libraries (msvcprt.lib, libcpmt.lib, etc.). 

View solution in original post

Highlighted
Novice
83 Views

@mecej4  Thanks! I added msvcprt.lib to the Additional Dependencies list and my dll just built successfully. Now to make sure that our application actually runs with the new dll!

0 Kudos