- Calling the generated functions - Describes the interface for the code and the initialize and terminate functions. Those functions set up some necessary data structures and any persistent or global data. Call initialize once before using your other generated code and call terminate once at the end.
- Package generated code - Describes how to package the code and any necessary dependencies to move to another environment.
- Using and example main - The examples folder contains an example of a C main function that can call your generated code. It shows how to interact with the generated code and can be a good starting place for using the code. The example main also shows the proper usage the initialize and terminate functions.
What do I need to include when I use a static C library from Coder?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Doug McKenzie
el 31 de Jul. de 2015
Editada: Ryan Livingston
el 1 de Ag. de 2015
I'm trying to learn how to use Coder. I have a simple Matlab function that I have converted into a static C library. I want to use this library on another machine as part of a larger program. What exactly do I need to move? Do I need the whole folder, including the examples and interface sub-folders?
This second machine will know nothing about Matlab, it runs only C.
What do the _initialize and _terminate functions do? Are they needed in a C environment?
0 comentarios
Respuesta aceptada
Ryan Livingston
el 1 de Ag. de 2015
Editada: Ryan Livingston
el 1 de Ag. de 2015
The MATLAB Coder documentation has a deployment section with many relevant topics that discuss this. Some particular pages of note would be:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!