Why my exe file built in matlabR2009a cannot run on other systems?

3 次查看(过去 30 天)
I make exe file in matlabR2009a on a system having windows XP(32 bit).I have installed MCR on my system also and include MCR during formation of exe file. Now when it is made and I run it ,it is run.But when I copy the folder to a different system having windows 7(64 bit), the same exe file does not run. I have done all steps for the formation of exe file.Then why its not running on other systems? I have read in the answers of this forum too and have done what ever was sugested.But still in vain.I don't know why? My method: First I made an m file and saved it in the working directory Matlab with the name of "prompt.m". Now I typed deploytool in the command window,so the deployment tool window opened.I opened a new project window.I named my project as prompt1.prj and saved it in the same working directory Matlab.I added my prompt.m file to the main function.I also checked that MCR was included in the setting.Now I clicked build button.So after some time,the project was built on the same name ie prompt1.Now I coppied the folder to the desktop of my system and I open the folder and I run the prompt.exe file and it is run there.But now when I copy the same folder to another system having windows 7, it gives me this error shown in the image.
I don't understand this error.This is :"The program cannot start because mclmcrrt710.dll is missing from your computer.Please can any body help me in this regard? Thanks in advance.

回答(2 个)

Harsheel
Harsheel 2015-7-9
Prior to R2010b, ML Compiler generated applications were not cross-platform compatible. This means that your 32-bit application may not work on a 64-bit Windows.
I am unsure if this is the main reason for the error you're getting, but if your system PATH looks correct, that is, it has the fullpath to the MCR installation (eg: C:\Program Files (x86)\MATLAB\R2009a\v NN \runtime\win32) then you might wanna upgrade MATLAB to at least 10b version.
  4 个评论
Sadiq Akbar
Sadiq Akbar 2015-7-12
Thank you very much for your further feedback.I typed mexext on the command prompt of matlabR2015a.When I pressed the enter key,it showed me mexw64 on the command prompt.I don't understand what does this mean? Further you have told me what is the system PATH on win xp and win 8 machine and for this you have guided me too by saying that type path on the windows command prompt.But sorry I don't understand windows command prompt also.I know only DOS prompt in windows.
Harsheel
Harsheel 2015-7-13
As Walter mentioned below, you have installed a 64-bit MATLAB R2015a ( mexw64 means 64 bit MATLAB). This MATLAB will create 64-bit exe files that do not work on 32-bit Windows OS. You need to install a 32-bit MATLAB and recompile your application to get a 32-bit exe. Try running this 32-bit exe on your winxp and win8 machines.

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2015-7-12
In order to have your .exe work on an MS Windows machine running a 32 bit operating system, you must create the .exe using a 32 bit version of MATLAB.
The mexw64 that you are seeing indicates that you are using a 64 bit version of MATLAB and that it will generate binary for Windows 64 bit systems.
  1 个评论
Sadiq Akbar
Sadiq Akbar 2015-7-13
Thank you so much to both of you Harsheel and Walter for your feedbacks.Thats right that this command ie mexext shows us the exe bit type wether its a 32 bit or 64 bit.Further, I created my exe file in matlab R2009a(32 bit) installed in an xp system(32 bit).Then I copied that complete folder to usb drive and then I pasted that exe file in a windows8 (32 bit again) system and there was no matlab installed in that windows8 system.Then I tried to run it.But a dos window appears and vanishes in no time.I did this process for several times but in vain.But according to you it must run on a 32 bit system.Now what it is so?Regards, Sadiq Akbar

请先登录,再进行评论。

类别

Help CenterFile 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