Can you run Mex file as part of a compiled Matlab code in Matlab runtime?

3 views (last 30 days)
Bijan Nouri
Bijan Nouri on 26 Oct 2016
Answered: Walter Roberson on 15 Nov 2016
I want to create a Matlab executable which uses a Mex File (savepng from file exchange). Compiling of the entire programm works, but during the executaion of the executable causes the Mex file an error ("Sorry, auto-compilation failed."). The entire programm works fine when not used as executable.

Answers (2)

Madhura Suresh
Madhura Suresh on 15 Nov 2016
Does the mex file work on your machine before compiling it into an exe?

Walter Roberson
Walter Roberson on 15 Nov 2016
If you look at the source for savepng.m you will see that it just does
You would execute that line yourself, before-hand, and include the savepng.mex* file in your project.

Community Treasure Hunt

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

Start Hunting!

Translated by