Visual studio #include "mex.h" header not working with VS CUDA project

So i’m using vs 2012 ultimate 32 bit.

I start a new project with a template of CUDA 6.0 Runtime (Cuda 6.0 toolbox installed)

I put the header #include “mex.h” and I get the message Error: cannot open source file “mex.h”.
By the way, MATLAB is installed already (R2014b).

Putting the header #include “stdafx.h” doesn’t fix the problem.

Please help O.O

More info about my problem:

You probably solved it already, but the change you need is to simply add the MATLAB include directory that contains mex.h (usually it’s $MATLABROOT/extern/include) to your Visual Studio include directory path, accessed from the project properties.