Matlab doesn't seem to recognize SPM 2 files - "spm_list_files.dll is not a valid win32 application"
5 views (last 30 days)
Show older comments
Hello All,
I am using Matlab R2009b and SPM2 on a Win7 32-bit platform. I have previously tried running the same combination on Macbook pro using Parallels and Bootcamp. In all cases the error message is identical:
>> tsbatch_tmsextract(gp,sp) ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2009b\toolbox\spm\spm2\spm_list_files.dll': C:\Program Files\MATLAB\R2009b\toolbox\spm\spm2\spm_list_files.dll is not a valid Win32 application.
.
Error in ==> spm_list_files_expand at 42 [Files,Dirs] = spm_list_files(WDir,Filter);
Error in ==> spm_get at 1754 [P,null] = spm_list_files_expand(dir,fil,ListOpts);
Error in ==> tsbatch_tmsextract at 53 trials = spm_get('files',trial_dir,[gp.raw_filt '*' gp.art_ext]);
I have no programing experience, so if you think you have a solution to my problem, please try to use the simplest form of your explanation as possible.
Thanks in advance, Michael
0 Comments
Answers (3)
Jason Ross
on 18 Sep 2012
Did you get the 64-bit version or the 32-bit version? Sounds like you might be trying to use the 64-bit on 32-bit and that's not going to work.
0 Comments
Michael
on 18 Sep 2012
3 Comments
Jason Ross
on 19 Sep 2012
Edited: Jason Ross
on 19 Sep 2012
From reading that page, and also the download page of SPM2, it seems there is a newer version called SPM8 that likely is more supported, as follows:
"SPM8 is designed to work from MATLAB versions 7.1 (R14SP3) to 8.0 (R2012b)"
SPM2 says it works with "MATLAB 6.0 - MATLAB 6.5", which pre-date the R<year>[a|b} releases, and map to R12 - R13. R2009b 's version is "7.9"
Ken's suggestion is also worth looking into if you must work with SPM2. But if I was in your shoes, I'd likely give the newer version a try if it will also meet your requirements.
References: SPM8: http://www.fil.ion.ucl.ac.uk/spm/software/spm8/ SPM2: http://www.fil.ion.ucl.ac.uk/spm/software/spm2/ MATLAB versions: http://en.wikipedia.org/wiki/MATLAB#Release_history
Ken Atwell
on 19 Sep 2012
Edited: Ken Atwell
on 19 Sep 2012
Jason might be on to something with a corrupted download. However, I have also seen this message when a MEX file is present (and valid), but a dependent DLL is missing. To see if this is the case:
- Download the Dependency Walker tool from <http://www.dependencywalker.com>
- Open the MEX-file with Dependency Walker. If it shows any red in its table, you likely have a dependency problem that you will need to address before MATLAB can have a hope of loading the file.
If SPM includes source code, you can consider rebuilding the MEX-File from source. If you go down this route, you would need to install not a modern compiler, but one that was supported in 2009. Refer to <http://www.mathworks.com/support/compilers/R2009b/>
See Also
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!