mex function error in Win32
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have an old mex function that is inside a dll running in Windows XP. When I run MatLab 5 the function works ok, but when I run MatLab R2007b it comes up with the following error:
??? Invalid MEX-file 'C:\myfile.dll':
C:\myfile.dll is not a valid Win32 application.
What does this mean, why does it work in MatLab 5 & not R2007b; what can be done about this?
0 comentarios
Respuestas (2)
Wayne King
el 28 de Sept. de 2011
Hi, please see:
The section:
New File Extension for MEX-Files on Windows Systems
0 comentarios
Kaustubha Govind
el 28 de Sept. de 2011
It looks like your R2007b is a 64-bit installation, but you are attempting to load a 32-bit DLL/MEX file on it. You need to re-compile your MEX function as 64-bit binary. Alternatively, you need to install 32-bit MATLAB on your 64-bit machine (see here for caveats).
2 comentarios
Kaustubha Govind
el 28 de Sept. de 2011
Does your MEX-file attempt to load other DLLs? Perhaps the system path in the R2007b environment somehow does not contain the path to these additional DLLs. You can check it your DLL file has any dependencies by using Dependency Walker: http://www.mathworks.com/support/solutions/en/data/1-2KUXT0/index.html?solution=1-2KUXT0
Ver también
Categorías
Más información sobre Adding custom doc en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!