GPU Problem

Hi everyone…
I want to write a code on GPU which contain simple maths…
I have matlab 14,window 7 ,cuda 5.0 ,visual studio 10…
I tried each and every possibility to start but failed…
1- using mex files in matlab… but while using cublas library…linking error comes…
2- using mex files in matlab… but while using thrust library…unknown error comes…
3- using mex files in matlab… but makeFile.make could not execute ,so linking problem comes
4- using .cpp file in visual studio… but while using mat file data… mx.lib missing error comes…
please tell me what can I do now??/