Borrar filtros
Borrar filtros

Sharing a common library between C/C++ s-functions?

1 visualización (últimos 30 días)
Daniel Smith
Daniel Smith el 15 de Jul. de 2016
Editada: Walter Roberson el 15 de Jul. de 2016
I have a single common library that I would like to share between multiple C/C++ s-function (not multiple instances of the same s-function). The shared library contains a global data object.
What is the correct way to mex this on Linux?
mex sfun1.cpp mylib.cpp
mex sfun2.cpp mylib.cpp
Successfully builds but each s-function has its own instance of the global data object. If I do:
mex mylib.cpp
mex sfun1.cpp
mex sfun2.cpp
Each of the s-functions can not find the symbols from mylib.cpp

Respuestas (0)

Categorías

Más información sobre Simulink Coder 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