error when compiling with mcc and app designer

12 ビュー (過去 30 日間)
Vitor Manuel Ribeiro
Vitor Manuel Ribeiro 2020 年 4 月 3 日
Hi I am designing an application with app designer in r2019b and i am trying to compile with mcc an m file after pushing a button. However i am retrieving the path for the m file with uigetfile and try to use it with the command mcc -m -I app.pathmatlab app.filematlab but i get the error Error: No source files were specified (-? for help).
I want to give the full path of the source file to mcc.
Can you provide any help on this?
P.S app.pathmatlab and app.filematlab are the folder and filename of the source file .m .
  1 件のコメント
Birdman
Birdman 2020 年 4 月 3 日
Can you share your app?

サインインしてコメントする。

採用された回答

Steven Lord
Steven Lord 2020 年 4 月 3 日
Is the command you're trying to execute literally this?
mcc -m -I app.pathmatlab app.filematlab
If the inputs you want to pass into a function are stored in variables, fields of a struct array, cells in a cell array, or properties of an object you're going to need to call that function using function syntax not command syntax.
mcc('-m', '-I', app.pathmatlab, app.filematlab)
What you'd originally written was the equivalent of:
mcc('-m', '-I', 'app.pathmatlab', 'app.filematlab')
and would try to compile the files named app.pathmatlab and app.filematlab, not the files whose names are stored in those properties of the app.
  1 件のコメント
Vitor Manuel Ribeiro
Vitor Manuel Ribeiro 2020 年 4 月 3 日
It worked like charm.
Thanks,
Vitor

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by