How do I prevent my MATLAB Compiler-generated shared library functions from displaying printed text to the screen?

2 visualizaciones (últimos 30 días)
I would like to obtain a string containing the text that is normally output to the screen from my MATLAB Compiler-generated shared libraries. Instead of automatically printing these messages, I would like to display them in a dialog box, or otherwise alter how my application displays the text of the message. MATLAB Compiler 3.0 (R13) provided the "mlfSetPrintHandler" function for this purpose, but this function seems to no longer exist in MATLAB Compiler 4.0 (R14).

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 17 de Oct. de 2017
To achieve the same functionality as the "mlfSetPrintHandler" function, you can create your own version of the "mclDefaultPrintHandler" function in the code that uses your library. For more information you can refer to the following location:
To use your version of the "mclDefaultPrintHandler" function, you will need to pass a pointer to the function when you initialize your library using the "[libname]InitializeWithHandlers" form of the initialization function, where <libname> is the name of your shared library. For more information, you can refer to the following location:

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by