? Invalid MEX-file error

I am trying to compile Szeta.cu for FS_2Dturb(128,1,1,1) with CUDA. I have Windows XP, MSVC 9.0 and CUDA 2.1.
Here is what I got:

nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
Szeta.cu
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(174): here; dllimport/dllexport dropped

tmpxft_00000a3c_00000000-3_Szeta.cudafe1.gpu
tmpxft_00000a3c_00000000-8_Szeta.cudafe2.gpu
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(174): here; dllimport/dllexport dropped

tmpxft_00000a3c_00000000-3_Szeta.cudafe1.cpp
cl : Command line warning D9025 : overriding ‘/EHc-’ with ‘/EHc’
‘mt’ is not recognized as an internal or external command,
operable program or batch file.

tic; FS_2Dturb(128,1,1,1); toc;
??? Invalid MEX-file ‘F:\RDE\Matlab_CUDA_1.1\Szeta.mexw32’: The specified module could not be found.

.

Error in ==> FS_2Dturb at 89
d1 = dt*Szeta(zeta,k,nu4);

Why Szeta.mexw32 is invalid?

Thanks

Hi!

I had a similar problem.

It´s not Szeta.mexw32 which is invalid, but another file which is linked to it. In my case it was cudart.dll; for whatever reason it had been deleted.

Run the dependency walker from http://www.dependencywalker.com/

It shows you the dependencies and you may find which file is missing.

Hope this helps!