필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Daniel Smith
Daniel Smith 2016년 7월 15일
편집: Walter Roberson 2016년 7월 15일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by