필터 지우기
필터 지우기

Errors encountered while building custom code simulation target for model (using "C Function" and Error message with garbled code)

조회 수: 3 (최근 30일)
I want to call the class I customized in C++ in Simulink (there is no error on the VS platform), but when using the C function module, many error message will appear and garbled code will appear.
I don't know which link went wrong. How can I solve this problem?
I have included the relevant source files and header files.

답변 (1개)

Mark McBroom
Mark McBroom 2024년 3월 23일
편집: Mark McBroom 2024년 3월 23일
You mention that there is no problem building the code in VS. In VS, are there any compiler or linker flags defined? If so, add tthe same flags to the "Compiler flags" and "Linker flags" section of the "Custom Code" dialog shown in your screen shot above.
Also, it looks like you are trying to integrate external code for DDS. Are you aware that MathWorks has a DDS Blockset for Simulink? https://www.mathworks.com/products/dds.html
This blockset supports the DDS protocol for simulation and code generation and works with DDS stacks from RTI and eProsima.
  댓글 수: 2
昱颖 陈
昱颖 陈 2024년 4월 1일
Thank you! I will try again the solution you mentioned later; Also, when I use dds blockset, I often encounter problems, such as when importing XML files, there are not many related documentation, so I am not very good at using it
Mark McBroom
Mark McBroom 2024년 4월 1일
IM me directly if you'd like help with using the DDS Blockset and importing XML files. I can help you resolve. Note that there are some limitations with DDS blockset for support of DDS Sequences.

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by