Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
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).

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 17 Oct 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:

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by