Fully standalone executable file
이전 댓글 표시
Hi @ all,
I'm not an expert in compiler. I would like to ask if someone tried to create, starting from matlab m file, a complete standalone executable file.
I already read a lot of technical documentation and a saw different webinar about the Matlab Compiler.
I tried to following step by step the webinar's instruction :
- Create the project (with the main file like a function)
- Build the project including the MCR
- Packing the project
But when i run the exe file in a PC without matlab and without the MCR the program doesnt works.
Where I wrong?
Another questions :
Exists some tecnhical documentation with a list and the explication of the whole files created after the project build?
What is the different between 'standalone application' and 'windows standalone application' ?
If i use the windows standalone application if possible use the exe file with differnt operating system (such as Windows vista and/or windows 7)?
Is it possible creates a unique exe file working in both 32 and 64 bit operating system ?
Thanks in advance
M1Tc4
댓글 수: 1
Andreas Goser
2012년 11월 6일
As I can't answer all questions: You need the MCR, otherwise it will not work ant it is designed like that. Maybe you want to generate C Code? Then look at the MATLAB Coder.
채택된 답변
추가 답변 (2개)
Andreas Goser
2012년 11월 8일
0 개 추천
It is fine to be somewhat demanding, because you want to achieve a goal. Such community questions typically lead to fast answers, but you can never be sure of it and also if this will really bring you to a solution. You may want tio contact Technical Support.
Josue
2012년 11월 9일
0 개 추천
HI Mitch,
I'm having the same question of you, Do you found the way to make it Full standalone executable file? When I generate the .exe file, if I don't place it on the same folder where the matlab functions (.m) and figures(.fig) are, the executable doesn't work.
Thanks,
댓글 수: 5
Image Analyst
2012년 11월 9일
Did you also install the MCR? You need that. The exe is not really a "standalone" executable, even though we call it that, because it also requires installation of the MCR. However the target computer doesn't need a MATLAB license or the full-blown MATLAB development environment.
Regarding discussion of the " real" executable... you might say that the standalone exe that gets created is not the "real" executable because it's actually like a self-extracting archive. When you run it, it unpacks a bunch of stuff in a hidden secret folder somewhere, and it actually runs it out of there, which not what you thought. If you want to find out where that is, have your program fprintf ctfroot to the command (console) window and you will see where the executable really lives.
fprintf('The executable was unpacked to %s\n', ctfroot);
David
2013년 1월 14일
Hi there,
I'm having this problem too, and I have installed MCR. When I double-click MyExecutable.exe, nothing happens (even after a few minutes, and Task Manager shows no evidence of anything happening).
If I run MyExecutable.exe from the command line, I immediately get a dialog box saying "WorkstationSA.exe has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I can then choose to "Debug" or "Close program". If I choose "Debug", Visual Studio Just-In-Time Debugger tells me "An unhandled win32 exception occured in MyExecutable.exe [1140]". There are some debugging options from there, but it all seems out of my depth.
The executable runs fine on my Windows XP desktop. The problem only occurs on my Windows 7 laptop. Do you know any possible solutions?
Thanks, David
Andreas Goser
2013년 1월 14일
Maybe it is not about the OS (XP vs. Win7) but the architecture? let me guess. It is Win XP 32 bit and Win 7 64 Bit?
Image Analyst
2013년 1월 14일
David
2013년 1월 15일
Thanks for the help. I wasn't aware of that FAQ page. My problem is fixed now.
I'd like to be able to post what my solution was but I'm not actually sure which change was the crucial one :s . Dependency Walker flagged up some missing DLLs, but I wasn't able to replace them. Also, I think they may have been 'false positive' detections from Dependency Walker, because they were missing on the 32bit PC too, where the .exe worked fine. The two architectures were as Andreas guessed.
The .exe worked when I built and packaged it on the same (64bit) machine as the problem was occurring. Maybe that helped.
Anyway, thanks again for your helpful suggestions. Sorry I can't be clearer.
카테고리
도움말 센터 및 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!