CUBLAS in *.cu

I tried to use CUBLAS library in *.cu file, but whenever I did it I faced a mistake :

:matrixMul.obj : error LNK2019: unresolved external symbol _cublasInit@0 referenced in function __Z7runTestiPPc1>…/…/bin/win32/Debug/matrixMul.exe : fatal error LNK1120: 1 unresolved externals

[1] Is there some way to overcome this problem ?

[2] Is it possible to use CUBLAS library in *.cu file ?


[1.] Probably you forgot to set the cublas library paths. Check in VS under project -> project properties -> configuration properties -> link whether the links have been correctly set or not (compare with already existing sample projects).

[2.] Yes definitely.