I do compile my MATLAB code with the option
mcc -m myfun.m
When I run the EXE file it asks for DLL files from MATLAB, which I can
understand why, but I do not understand why it is extrackting the whole code
into a directory first.
Isnt it the idea of compile is to run on single EXE file in MCC???
TIA
Cheers!
When I amde a EXE file and move it to another computer and run it, it
creates a directory and extract the m files into it.
So why did I compile if the source code can be seen????
that is my problem.
F
"Ron Legere" <leg...@ll.mit.edu>, iletide sunu yazdi
news:SIold.54$1T1...@llnews.ll.mit.edu...
Why do you compile? Two main reasons:
- To create a stand alone version of your program (including GUI
programs) to distribute to non-matlab users
- To create libraries you can call from C / C++ code.
The Matlab compiler ~used~ to create C code from your matlab code,
but not anymore. Now it creates a small wrapper function in C and
packages up and encrypts your m-files. The wrapper function calls
the appropriate dlls in the Matlab Component Runtime that extracts
the m-files and runs your application.
At least thats how I understand it. It's not really a 'compiler' anymore
(i.e. there is no code translation!) but it does what it claims.
You can read more at:
http://www.mathworks.com/products/compiler/description1.html
On what needs to go to another machine to distribute a stand alone:
http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/ch01intro17.html
It seems to work pretty well for me so far....
Ron