standalone doesn't start

2 ビュー (過去 30 日間)
Stefan
Stefan 2015 年 12 月 15 日
回答済み: Stefan 2015 年 12 月 16 日
Hello everybody,
I have deployed a standalone runtime of my application developped in MATLAB r2014b. If I run the standalone on my computer (with MATLAB installed) it comes up and works fine. If I tranfer the application-files to another computer and run the executable, it doesn't come up (with admin-rights or without). Only the splash screen is appears for several seconds an then disappears. In the windows command console there is an error thrown:
Error using ~=
Not enough input arguments.
Error in startup (line 15)
Not enough input arguments.
I have installed MCR_R2014b_win64_installer.exe from the MATLAB-website under admin-rights.
What is wrong?
Thanks for your help.
Greetings, Stefan
  1 件のコメント
Adam
Adam 2015 年 12 月 15 日
編集済み: Adam 2015 年 12 月 16 日
I'm not familiar with the exact nature of what gets packaged into a deployed application, but from your error message it seems you have a startup file that is run every time Matlab starts. This is being packaged into your application and run when the application starts. Whatever is on line 15 of that startup file is not happy when it is run from elsewhere. Have you got some code working with a hard-coded path or something similar in there? I would guess you have something that is specific to your machine.
Off the top of my head I can't think what kind of call would result in 'Not enough arguments' for the ~= operator - it works if either operand is [], but I guess if one operand is simply not defined at all in the code path it is running that would cause it.
Personally I always build an installer rather than copying the raw executable around to different machines, but that shouldn't make a difference to your particular problem I don't think.

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

採用された回答

Stefan
Stefan 2015 年 12 月 15 日
Hello Adam,
thanks for your advice. I remember, that there was a modification performed by our IT department. Could be that this affected my startup-file. But how can I prevent this being deployed wiht my application. I don't think I will need it for the application to run.
Greetings, Stefan
  2 件のコメント
Steven Lord
Steven Lord 2015 年 12 月 15 日
If there are lines in your startup.m that you don't want to be executed in a standalone application, guard them.
if ~isdeployed
disp(['This will only be displayed if you are NOT ', ...
'in a deployed application'])
end
Adam
Adam 2015 年 12 月 16 日
If you didn't create the startup file yourself and don't know where it is you can type
which startup
to tell you where it is or simply
edit startup
to open the startup file for editing or reading.

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

その他の回答 (2 件)

Image Analyst
Image Analyst 2015 年 12 月 15 日
and tell us what line 15 says, or even better, give us the first 15 lines of the source code.

Stefan
Stefan 2015 年 12 月 16 日
Hello guys,
many thanks for your comments and answers. I edited the startup.m like you said, Steven, and it works fine now. The Standalone works without any problems on other computers.
Greetings, Stefan

カテゴリ

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