Visual Studio 2008 and MATLAB PLUG IN problems with 'fft2_cuda.mexw32' failed

Hello,

I am a beginner in matlab and cuda, and i am trying to call cuda from matlab. I have downloaded Matlab_CUDA-1.1a from nvidia weg page.
I copy nvmex.pl to the bin directory of matlab and type in matlab:

mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
Could not locate C:\CUDA\cudart.lib

C:\ARCHIVOS DE PROGRAMA\MATLAB71\BIN\MEX.PL: Error: Link of ‘fft2_cuda.mexw32’ failed.

??? Error using ==> mex
Unable to complete successfully

if I type:

mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft -v

(I take 0 errors and 64 warnings like…)


Warning C:\CUDA\include\vector_functions.h: 228 static struct float3 function(float,float,float) make_float3' is not referenced Warning C:\CUDA\include\vector_functions.h: 223 static struct float2 function(float,float) make_float2’ is not referenced
Warning C:\CUDA\include\cuComplex.h: 187 static struct float2 function(struct float2,struct float2) cuCaddf' is not referenced Warning C:\CUDA\include\cuComplex.h: 183 static struct float2 function(struct float2) cuConjf’ is not referenced

0 errors, 64 warnings

–> “lcc -c -Zp8 -I"C:\Archivos de programa\MATLAB71\sys\lcc\include” -DMATLAB_MEX_FILE -noregistrylookup “C:\Archivos de programa\MATLAB71\sys\lcc\mex\lccstub.c” -Fo_lib1662.obj"

Contents of 166_tmp.rsp: 

C:\DOCUME~1\JOSANT~1\CONFIG~1\Temp\fft2_cuda.obj

–> “lcclnk -o “fft2_cuda.mexw32” -tmpdir “.” -dll “C:\Archivos de programa\MATLAB71\extern\lib\win32\lcc\mexFunction.def” -L"C:\Archivos de programa\MATLAB71\sys\lcc\lib” -libpath “C:\Archivos de programa\MATLAB71\extern\lib\win32\lcc” _lib1662.obj -s @166_tmp.rsp C:\CUDA\lib/cudart.lib C:\CUDA\lib/cufft.lib libmx.lib libmex.lib libmat.lib"

Could not locate C:\CUDA\cudart.lib

C:\ARCHIVOS DE PROGRAMA\MATLAB71\BIN\MEX.PL: Error: Link of ‘fft2_cuda.mexw32’ failed.

??? Error using ==> mex
Unable to complete successfully

I have Matlab 7.1, Visual Studio 2008 and WinXp32.

Should I write something or change any property from Visual Studio 2008?
Should I change something in Matlab?..
Is the version correct?

Thank you very much

I think, Matlab 7.1 doesn’t work with Cuda.

Has anybody try with this version?

When I try to compile, I get:

Could not locate C:\CUDA\cudart.lib

and if I compile with -v

I get:

–> “lcclnk -o “fft2_cuda.mexw32” -tmpdir “.” -dll “C:\Archivos de programa\MATLAB71\extern\lib\win32\lcc\mexFunction.def” -L"C:\Archivos de programa\MATLAB71\sys\lcc\lib” -libpath “C:\Archivos de programa\MATLAB71\extern\lib\win32\lcc” _lib45662.obj -s @4566_tmp.rsp C:\CUDA\lib/cudart.lib C:\CUDA\lib/cufft.lib libmx.lib libmex.lib libmat.lib"

and what REALLY important is, I can see in the answer of matlab this sentences:

C:\CUDA\lib/cudart.lib C:\CUDA\lib/cufft.lib

Maybe the function mex doesn’t take the library path in a good way.
Should I change something?. Does anybody have the same problem?

Thank you