CUDA with Matlab - nvmex has compile errors on system files

I downloaded Matlab_CUDA-1.1a.zip and after putting my Visual Studio 2008 cl.exe and the NVIDIA nvcc on the DOS path, I can get the compilation started.

I tried compiling the example they provide. The mex compilation works fine. But with nvmex after a while it quits with a huge bunch of errors.

Here are the first few lines.

Any help appreciated.

Bob
BTW, I am using Windows XP, 32 bit, SP2 and Visual Studio 2008 Express


nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
Szeta.cu
tmpxft_000009f4_00000000-3_Szeta.cudafe1.gpu
tmpxft_000009f4_00000000-8_Szeta.cudafe2.gpu
tmpxft_000009f4_00000000-3_Szeta.cudafe1.cpp
cl : Command line warning D9025 : overriding ‘/EHc-’ with ‘/EHc’
tmpxft_000009f4_00000000-12_Szeta.ii
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(235) : error C2065: ‘_Buffer’ : undeclared identifier
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(235) : error C3861: ‘wchar_t’: identifier not found

… 100 more lines of errors