Thursday, January 13, 2011

Compiling matlab to a standalone with no display option

You might often want to compile matlab files to a standalone executable using the mcc command. However, by default you will obtain annoying warning messages about no display being available. To avoid these messages you should use the compiler directive -R

Before Matlab 2010b
mcc -R -nodisplay ...

For Matlab 2010b, although the documentation says it should be the same it isnt. You need to drop the - . i.e.
mcc -R nodisplay ...

2 comments:

reve_etrange said...
This comment has been removed by the author.
reve_etrange said...

Hmm, this isn't the case for me. When I pass "-R -nodisplay", the warning is suppressed, but at the end I get an annoying "NO DISPLAY." With "-R nodisplay" it's the opposite.