MATLAB+CUDA 2.1 vs MVSC7.1? nvcc complains about VS7.1, can't compile

Hi all,

(Config: XP SP3, 32 bit, Matlab R2007b, MS VS .NET 2003, CUDA 2.1)

New variety of an old problem: I’m trying to get CUDA to work with MATLAB, working through the examples given in the README.txt of the plugin v1.1. The nvmexopts.bat assumes VS2005, which I don;t have, I have VS2003 (which would like to keep as it is because I use it in conjunction with an external compiler and I don’t want to have to sort out the integration with VS2005/8…)

mex works fine, and I can run the speed_fft example. For the accelerated version, I edited nvmexopts.bat to point it to cl.exe in the VS install dir, and set other paths correctly.

[font=“Courier New”]>> nvmex -f nvmexopts.bat -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
nvcc warning :

nvcc support for MSVC 7.1 has been deprecated and is no longer being maintained

cl : Command line warning D4002 : ignoring unknown option ‘/Zc:-’
c1xx : warning C4117: macro name ‘_WCHAR_T_DEFINED’ is reserved, ‘#define’ ignored
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN/…/…\VC7\INCLUDE\time.h(157): here; dllimport/dllexport dropped

c:\program files\matlab\r2007b\extern\include\matrix.h(336): error: “wchar_t” is not a type name

1 error detected in the compilation of “C:\DOCUME~1\GVANSO~1\LOCALS~1\Temp/tmpxft_00000464_00000000-6_Szeta.cpp1.ii”.

C:\PROGRA~1\MATLAB\R2007B\BIN\NVMEX.PL: Error: Compile of ‘’ failed.

What’s the _WCHAR_T stuff? I’m (cough cough) not very proficient at C, so the warning C4117 does not make sense to me; I don’t even understand what c1xx is doing in the process.

Is there a fix or workaround?

Any help appreciated.