MATLAB: Are graphics supported in MATLAB Compiler generated shared libraries

compilercsglsharedlibdllgraphicslibhglibrarylinkMATLAB C/C++ Graphics Librarysharedsupportunsupported

Using MATLAB Compiler 3.0 (R13), I am able to generate a shared library that links to the Graphics Library using the following syntax:
mcc -t -L C -W libhg:my_lib -T link:lib -h my_mfile.m
Is this type of library officially supported?

Best Answer

As of MATLAB Compiler 4.0 (R14), graphics are officially supported in Compiler generated shared libraries. M-functions that use graphics can be compiled into a C shared library using the "-B csharedlib" option, just like compiling a non-graphical M-function into a C shared library. If you are using a previous version of MATLAB Compiler, see the following:
For MATLAB 6.5 (R13), The MATLAB C/C++ Graphics Library is only officially supported for use in MATLAB Compiler generated executables.
Although generated shared libraries that use graphics may in some cases function without error, the MATLAB C/C++ Graphics Library has not been fully tested for use in a MATLAB Compiler generated shared library and is not guaranteed to work. We are unable to provide assistance for cases where such a library does not work.
Note that MATLAB COM Builder allows you to generate shared libraries which include MATLAB graphics routines in the form of a COM (Common Object Model) object.