Why do I get an error regarding "socketfuncs.h" when I try to build my model that contains a UDP block from the Simulink Real-Time library?

조회 수: 3 (최근 30일)
I have a model that contains a UDP Send or UDP Receive block. I want to deploy this model to my hardware, but I receive the following error:
ERROR: fatal error: socketfuncs.h: No such file or directory
How to resolve this error?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2021년 9월 16일
편집: MathWorks Support Team 2021년 9월 16일
This error appears when your model contains UDP blocks from the Simulink Real-Time (SLRT) library, but you are targeting a non-SLRT environment language compiler such as 'grt.tlc', 'ert.tlc', 'sldrt.tlc', etc.
If your target hardware is indeed a Simulink Real-Time target (Speedgoat), go to Model Configuration Parameters > Code Generation and choose 'slrt.tlc' (R2020a and earlier) or 'slrealtime.tlc' (R2020b or later) from the  list as the System Target File.
If your target hardware is NOT Simulink Real-Time, you need to remove these UDP blocks from the model and use blocks from the library that are appropriate for your target.
(1) For deployment to a Windows-based platform, use the UDP blocks from DSP System Toolbox or Embedded Coder Toolbox:
(2) For Simulink Desktop Real-Time, use the Packet I/O or Stream I/O blocks:
(3) For supported hardware such as Raspberry Pi, Arduino, BeagleBone, etc, use the UDP blocks from the corresponding hardware support package:

추가 답변 (0개)

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by