Question

I am trying to run FFTW code in a mex file. This is strictly for the purpose of development and testing. After some googling, I see that others have tried to do something similar and have had related problems, but I have not found any solutions. When attempting to run the mex file, Matlab tells me:

??? Error using ==> chirpTransform.mxCta Invalid MEX-file '\removed\my\directory\+chirpTransform\mxCta.mexw32': The specified procedure could not be found.

.

I am using gnumex with MinGW to build the mex file because LCC seems to have some issues. I have tried using the 32 bit DLL from the FFTW site (http://www.fftw.org/install/windows.html). I have tried using the fftwf3.dll in the Matlab 2009b bin directory. I built the dll from source using Msys/MinGW. In all cases, the results are the same. In all cases I did the following to generate the lib file.

c:\gnumex\mexdlltool.exe -d libfftw3f-3.def -D libfftw3f-3.dll -l libfftw3f.lib --as C:\MinGW\bin\as.exe

I also tried using the visual studio lib.exe tool and experimented with various mexdlltool flags.

It appears that I can directly call functions in the fftwf3-3.dll using Matlab's loadlibrary functionality. Since the DLL appears not to be the problem, I tried building a static version of fftwf3 and linking it directly into the mex file. I got the same results! If I remove the FFTW code, the mex file runs fine. I have just about given up at this point, and I am tyring to come up with alternative methods of testing.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top