error LNK2019: unresolved external symbol cublasDestroy_v2

Hi… I am using matlab 14 . when I run a cuda file (.cu) , error comes like

Error using mex Creating library code.lib and object code.exp code.obj : error LNK2019: unresolved external symbol cublasDestroy_v2 referenced in function “void __cdecl gpu_blas_mmul(float const *,float const *,float *,unsigned __int64,unsigned __int64,unsigned __int64)” (?gpu_blas_mmul@@YAXPEBM0PEAM_K22@Z) code.obj : error LNK2019: unresolved external symbol cublasSgemm_v2 referenced in function “void __cdecl gpu_blas_mmul(float const *,float const *,float *,unsigned __int64,unsigned __int64,unsigned __int64)” (?gpu_blas_mmul@@YAXPEBM0PEAM_K22@Z) code.obj : error LNK2019: unresolved external symbol cublasCreate_v2 referenced in function “void __cdecl gpu_blas_mmul(float const *,float const *,float *,unsigned __int64,unsigned __int64,unsigned __int64)” (?gpu_blas_mmul@@YAXPEBM0PEAM_K22@Z) code.mexw64 : fatal error LNK1120: 3 unresolved externals

how can I get rid of it???

link your code against the cublas library

If you don’t know how to add a library to the linker specification in visual studio, there are plenty of references on the web for that.

Sir I am using matlab 14…and this is error in mex file… in visual studio,i easily added the library… and code runs well… but I want to sove this problem in matlab…

when I google “mex link library” I get plenty of informative hits about how to link a library using mex. Have you tried anything?