Win 7 x64 Matlab R2009b - cannot compile *.cu


I have been going through many of the posts here, but could not yet find a solution how to compile *.cu from within Matlab. I have tried all version of, and always getting erros. I use CUDA Toolkit 2.3 and all examples are compiled fine under Microsoft Visual Studio 2008.

When I invoke this line:
nvmex -f mexopts.bat -IC:\cuda\include -LC:\cuda\lib -lcudart

I am getting the error:
cl : Command line warning D9024 : unrecognized source file type ‘C:\Users\David.DI\Documents\MATLAB\bilininterp\’, object file assumed
cl : Command line warning D9027 : source file ‘C:\Users\David.DI\Documents\MATLAB\bilininterp\’ ignored
cl : Command line warning D9021 : no action performed

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

??? Error using ==> nvmex at 206
Unable to complete successfully.

Appreciate any help

Problem solved.

I had to modify the nvmex.m file. The new file is attached.

Hello, I am attempting to try out cuda with Matlab under windows 7, and am finding the same problems. I have noticed that you talk about an attached file, but the file itself hasnt been attached. If you could be so kind so as to attach the following files:



And if necessary, the configuration File used by Visual Studio 2008, if you have it working wiht 2008.

Thanks in advance, kind regards,

David Lisin

Please , Can you upload the nvmex.m ? And see me the steps you followed?
My mail is if you had a problem


Is it possible for you to send me this nvmex.m file? Many thanks.

For CUDA (with MATLAB) use/setup/tips this site is the best:

scroll down that page to see how to compile mex function via Visual Studio.