Creating a Stand Alone App for a Matlab GUI

1 visualización (últimos 30 días)
Matthew
Matthew el 5 de Nov. de 2013
Respondida: Walter Roberson el 6 de Nov. de 2013
I would like to be able to create .dll, .h, and .lib files that I can use and call from MS Visual C++ 6.0. At this point I have made a Matlab GUI which uses several .m and .fig files. I have also used the Matlab compiler and the command:
mcc –B cpplib:new_file_name file1.m file1.fig file2.m
to create a C++ shared library that has .dll, .h, and .lib files and I have successfully called "file 1" from MS Visual C++ in a Win 32 Console Application. However, when I call "file 1" in the C++ program, there is a long delay before my MATLAB GUI opens. I believe this is because during this time, the MATLAB license had to be accessed. Therefore, I need a different way of compiling my Matlab code into a .dll, .h, and .lib format that can be used in another program without ever having to use the MATLAB license. Another option for me is if there is some sort of way (using visual C++ or MATLAB) to see if the MATLAB license is actually being used when I run my C++ program that calls the MATLAB GUI. (If my gui is in fact being run without the MATLAB license then I don't have a problem and the long delay is being caused by some other reason.) Thanks for any help.

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Nov. de 2013
No, executables built with the MATLAB Compiler do not need the license to be checked (at least not for the base product.)
However, when you build something with the MATLAB Compiler, the time to start it up will be almost exactly the same as it would take to start up MATLAB itself. MATLAB Compiler uses the same threaded interpretion mechanism that MATLAB itself uses.
If you need something that loads faster, then you need to use MATLAB Coder. However, MATLAB Coder is not able to generate code for any graphic elements.

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by