standalone executable opens with warning for missing directory paths

1 回表示 (過去 30 日間)
Daniel
Daniel 2012 年 1 月 12 日
Hi,
when I use mcc to compile a matlab function, the standalone opens allways with a warning: | Warning: Name is nonexistent or not a directory: /usr/local/bsse/etc/matlab. > In path at 110 > In addpath at 87 > In matlabrc at 239
The path is the location of Matlab in the machine where I created the standalone. What can I do to avoid this behavior?
thanks in advance, Daniel

採用された回答

Chirag Gupta
Chirag Gupta 2012 年 1 月 12 日
This is possible because the matlabrc file on the machine where the executable was compiled might have modified settings (or a custom startup file).
MATLAB compiler when compiling picks up these (startup files). When the deployed application is run, it again tries to execute these startup file, but will throw up warnings if the path is not present.
Because of this reason, I'd recommend using the isdeployed (and ismcc) function to customize matlab start up routines.
if (~isdeployed || ~ismcc)
% Custom path additions, if not a deployed application or mcc
addpath(...);
end
  1 件のコメント
Daniel
Daniel 2012 年 1 月 12 日
thanks, it was a good hint. There was a -wrong- matlabrc.m file in the same directory as my mcc. Problem solved.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by