CUDA Matlab and Excel problems.

Hi!

Downloaded the Matlab package a while ago. Im trying to follow the instructions in the CUDA Matlab readme.txt, however I keep bumping into problems running the compilation part.

With the exact given command I get this:

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

Usage: 

    MEX [option1 ... optionN] sourcefile1 [... sourcefileN] 

        [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN] 

or (to build an Ada S-function):

    MEX [-v] [-g] -ada <sfcn>.ads 

Use the -help option for more information, or consult the MATLAB API Guide.

C:\PROGRAM\TOOLS\MATLAB701\BIN\WIN32\MEX.PL: Error: Unrecognized switch: -LC:\CUDA\lib.

??? Error using ==> mex

Unable to complete successfully

However, if I modify the second argument to likewise the first use “I” instead of “L”, not sure if this is a good idea or not since Ive not reached information covering this. However, this is the result from this transaction:

mex ifft2_cuda.c -IC:\CUDA\include -IC:\CUDA\lib -lcudart -lcufft

Usage: 

    MEX [option1 ... optionN] sourcefile1 [... sourcefileN] 

        [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN] 

or (to build an Ada S-function):

    MEX [-v] [-g] -ada <sfcn>.ads 

Use the -help option for more information, or consult the MATLAB API Guide.

C:\PROGRAM\TOOLS\MATLAB701\BIN\WIN32\MEX.PL: Error: Unrecognized switch: -lcudart.

??? Error using ==> mex

Unable to complete successfully

Although this package is good on its own, it would be nice to hear if someone has successfully compiled a lib/dll callable from Matlab through MSVC?

I’m also interested to know if anyone did try to use CUDA from Excel (which basicly should mean packing everything into a COM-runtime), would be very interested to hear about such an attempt, or better, success!?

Thank you for your generous input!

Ola

Install Visual Studio 2005 and type from a Matlab prompt:
mex -setup

Select Visual Studio as your default compiler. If you don’t have Visual Studio 2005, there is a pdf on Matlab Central that explain how to install the Express edition.

[url=“howto: mex + MS Visual C/C++ Express Edition 2005 - File Exchange - MATLAB Central”]http://www.mathworks.com/matlabcentral/fil...objectType=FILE[/url]

Hi mfatica. Thanks for your reply.

I do have VS2005, but it was installed previously to Matlab which makes it excluded from the list over default compilers. Is there something I can do, except the obvious to reinstall VS2005?

Ola