Invalid mex file at a compiled matlab GUI

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

 채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 10일

0 개 추천

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 ?

댓글 수: 3

Dimitrios
Dimitrios 2013년 1월 10일
편집: Dimitrios 2013년 1월 10일
Hi Walter, yea i forgot,
- all windows are 64 bit - all matlab MCR are 64 bit - I do not know which runtime libraries are required. and why are they there for some and not for all the computers? - I did not try the dependency walker, is it going to tell me also which runtime libraries i require?
Jan
Jan 2013년 1월 10일
You need the runtime libraries of the used compiler. Sometimes the libs for MSVC2005 and 2008 are installed already by other software, e.g. by Matlab.
Dimitrios
Dimitrios 2013년 1월 10일
hi Jan,
thanks! I also run the Dependency Walker, and found out that there are a few .dlls that are not installed. I will find the windows runtimes that need to be installed passed with my software in order to set up the those dlls.
thanks again

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by