Borrar filtros
Borrar filtros

Is it possible to call a matlab generated shared library multiple times in a program?

1 visualización (últimos 30 días)
When I use the recommended method
mclRunMain((mclMainFcnType)run_main, 0, NULL);
it always exits the program immediately. So how can i set this up to call the shared library function several times without exiting?

Respuesta aceptada

Faiz Gouri
Faiz Gouri el 10 de Feb. de 2017
It is my understanding that you would like to call MATLAB generated C/C++ shared library function multiple times in your program. You can call the library function multiple times in the same run_main() function. However, you cannot call run_main() multiple times when using Cocoa on the Macintosh, because when the function pointed to by run_main() returns, the MATLAB Runtime calls exit before the return value can be received by the application, due to the inability of the underlying code to get control when Cocoa is shut down. Refer this example for calling a shared library here

Más respuestas (1)

Tony Kirke
Tony Kirke el 10 de Feb. de 2017
Ah, thank you. I must have been doing something wrong then in how I assumed it was setup. I'll recode my case to take advantage of your explanation

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by