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: