Problems Compiling Matlab Code into Standalone
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Complete Compiling-Newbie here... I have a MATLAB code that I would like to be able to run on computers w/o MATLAB. Unfortunately, using mcc -m Mycode.m doesn't seem to produce a stand alone program... Any ideas or help?
채택된 답변
Titus Edelhofer
2011년 11월 23일
Hi,
some things to check:
- I guess the compiler is installed, otherwise you would have got an error "unknown function mcc".
- Has the compiler been set up? Run "mbuild -setup" to be sure.
- Run "mcc -v -m Mycode". Does it produce warnings/errors that might help diagnose?
Titus
댓글 수: 9
John Ogren
2011년 11월 23일
Hi Titus,
I ran "mbuild -setup" and the result that I it ran fine. It was successful in updating my options file.
I also ran "mcc -v -m Mycode" and I got an error. Before the error MATLAB output: "Compiler version: 4.11 (R2009b)". The error was:
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
As before, I am still in the dark... maybe this helps you!
Thanks again.
John: Is that the complete output that you need? No additional error information?
John Ogren
2011년 11월 23일
Kaustubha: What I put in my above comment was the only error that I received... any thoughts?
John, you are in the folder, where Mycode.m is? I.e., "dir Mycode.m" gives a result?
Can you try it with a simpler program, for example one that has only one line that says m=10; ?
Maybe you can try to compile from the deploytool instead of the command line.
John Ogren
2011년 11월 23일
So the first issue that I had was Matlab could not compile my code because I already had a version compiled into that directory. When I removed the old version and reran "mcc -m -v Mycode" everything worked fine. I have a code that runs... but how do I get it to run on computers that don't have Matlab? Also, when I run the code, it does not exit the "Matlab Environment"... That is, I have a blinking cursor but I can't type anything in the command line. Anyone know how to get back to the command line?
Daniel Shub
2011년 11월 23일
These are really new questions. You need to install and extract the MCR on the other computers (they need to be running the same OS as the compiled version). The last line of your code needs to be quit, or a little less frustrating
if isdeployed, quit, end
John Ogren
2011년 11월 23일
Daniel: I wrote these up as new questions... What I am looking for is a way to run my programs without having to install MCR on other machines. Ideas?
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
참고 항목
2011년 11월 23일
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
