Clear Filters
Clear Filters

Namespace option for Simulink Coder?

9 views (last 30 days)
Joshua Hansen
Joshua Hansen on 1 Jul 2020
Commented: Joshua Hansen on 7 Oct 2021
I've been having the same problem as others have in the past, note this question: https://www.mathworks.com/matlabcentral/answers/280107-replicated-functions-in-simulink-coder
To summarize, when compiling multiple Simulink models into libraries and trying to link them in the same build, there are multiple definition compilation errors for common functions (rt_atan2d_snf, rt_powd_snf, etc).
Has anything been done to resolve this issue? I noticed a CppNamespace option in coder, but there is no namespace option in the Simulink coder. Is there some other code generation option that can be enabled or disabled to prevent this problem?
  2 Comments
Dana Erez
Dana Erez on 7 Oct 2021
Hi,
I have the exact same problem as you do. Have you found a suitable solution or workaround?
Joshua Hansen
Joshua Hansen on 7 Oct 2021
No solution yet...still commenting out the duplicate functions in one of the generated code directories as a workaround.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!