Problems Compiling Matlab Code into Standalone
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
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.
Kaustubha Govind
2011 年 11 月 23 日
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?
Titus Edelhofer
2011 年 11 月 23 日
John, you are in the folder, where Mycode.m is? I.e., "dir Mycode.m" gives a result?
Image Analyst
2011 年 11 月 23 日
Can you try it with a simpler program, for example one that has only one line that says m=10; ?
Image Analyst
2011 年 11 月 23 日
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!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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)
