EXE file generated by Matlab compiler cannot work

I tried to use Matlab compiler to compile my .m files(including several GUI related files). Everything seemed to go smoothly. I got Matlab Runtime installed and the .exe file finally but when I clicked the icon, it had no response.
Then I started again and wrote a very simple .m file and did all the same thing. It worked!
I know some of the functions are not supported by Matlab compiler. Is this responsible for my problem? If yes, how can I know which functions fail?
My system is MAC OS. Thanks for any suggestions related to my problem.

Antworten (1)

Kojiro Saito
Kojiro Saito am 23 Mär. 2017
Bearbeitet: Kojiro Saito am 23 Mär. 2017

0 Stimmen

You had better make the compiled application create a log file. In compile options, try checking the checkbox of a log option. This option is located in the bottom.
Also, this link notes the limitation of functions which can be compiled.

2 Kommentare

In Mac OS, this log file seems unable to be generated (in Windows it is able to). Thanks anyway.
I have solved the problem. First I should avoid using 'guide' which is not supported by Matlab compiler. The second thing is a bit tricky. It turns out that this type of syntax cannot work:
function function_name
% code
while this syntax can work:
function function_name
% code
end
I don't know why. They should have no difference.
Jan
Jan am 5 Apr. 2017
Of course the code for productive work should not call guide. But you can include a GUI created by GUIDE in a compiled application.
The trailing end is required, if any function in the M-file uses it. This must happen for nested function in every case. But as far as I know this concerns Matlab also, not just the compiled code.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 23 Mär. 2017

Kommentiert:

Jan
am 5 Apr. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by