Error while exporting simulink model to DLL (Shared Library with embedded code)

1 view (last 30 days)
Hello,
I have a simulink model that simply multiplies an input by 2 and puts the result into an ouput. Now I want to export this simulink model or function into a .dll so that I can use it in other programs. I am doing that by using embedded code as describe in here: Package Generated Code as Shared Libraries - MATLAB & Simulink - MathWorks España
When I click the build button all the process starts and stops with an error at this point (See attached picture). All the previous steps are done properly.
Could anyone please tell me the root of this error? Because 3 days ago I did the same process and I was able to export to a .dll file but with no reason at all right now doing the same process this is not working.
Thakns, regards
  3 Comments
Rafael García Pérez
Rafael García Pérez on 18 Mar 2022
No, actually when I click to generate only C code, I have no error. But when I click on build system in order to generate DLL then I get the error. Attached picture of the files generated.
VBBV
VBBV on 19 Mar 2022
Edited: VBBV on 19 Mar 2022
It's a compile error which is something to do with your C file code syntax/ naming convention. Check with your C file if there are any coding errors first, then update the compiler if it's not recent version compatible to matlab

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!