Be the first to rate this file! 11 Downloads (last 30 days) File Size: 2.81 KB File ID: #30567

Managing Deployed Application Output with Message Handlers

by

 

Example code for "Managing Deployed Application Output with Message Handlers".

| Watch this File

File Information
Description

Demonstrates how to redirect the output of a MATLAB-Compiler generated application to a log file.

Required Products MATLAB Compiler
MATLAB release MATLAB 7.2 (R2006a)
Other requirements C compiler
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
24 Apr 2012 Christian

Peter,

thanks for this submission.

It works just fine for a command line application. However for a GUI application I can't suppress the command window compiling with log.c.

Can you please advice what needs to be changed in log.c (and possibly also in the mbuild-command?) to suppress the command window for Windows GUI applications?

Thank you

Christian

19 Aug 2011 Peter Webb

Russ,

The MATLAB Compiler generates libmsgfcn.h and libmsgfcn.lib. And yes, this will be a topic for a future blog post (to be published in Sept. or Oct. 2011, most likely).

09 Jun 2011 Russ

Hi Peter,

This looks like a very interesting way to redirect the output streams in deployed applications, however, the ZIP file available for download does not appear to include the libmsgfcn.lib and libmsgfcn.h files. Could you advise me where to locate these files please.

Your example here seems to relate to output redirection when calling the shared libary from a standalone C application - is it possible to achieve a similar effect when calling the shared library from a .NET applicatation? I am are running in to problems when the compiled Matlab code tries to output text to the console (i.e. standard output stream) which causes the .NET application to throw an exception.

The only advise I have been able to find online for redirecting streams is to use evalc() in the compiled code, however, this is not very elegant.

Do you have any plans to elaborate on this important subject in one of your excellent blog posts?

Regards,

Russ

Contact us