MATLAB: Invalid mex file at a compiled matlab GUI

guixinvalid mexMATLAB Compilermex compiler

Hi, i am using Matlab R2012a and i have created a gui in Matlab, that uses two mex files that i compiled from C code. The whole GUI i have compiled to an executable with visual studio 2010. The same compiler i used for the compilation of the mex files.
At some computers the executable runs without problems, at other computers the gui crashes. I placed a try-catch command in the gui to get the error that is being produced… and i found out that the GUI does not recognise the compiled mex files. It says that it is an "invalid mex file" and that it can not find the mex file in a specified 'Temp' location. Still when i open the path that the error message describes, the mex file is there.
To computers that i run the executable, i have installed the MCR 4.17. All of the tested computers are running windows 7. Is there an idea on what might be going on and some computers can not find/read the mex file?
thank you in advance for the help
Dimitrios

Best Answer

Are all of the systems 32 bit Windows, or all 64 bit? Is MATLAB all 32 bit or all 64 bit?
Do all of the systems have the Windows run-time libraries installed?
Have you tried using Dependency Walker ?
Related Question