I've written a MATLAB function that uses "dsp.UDPSender" or "dsp.UDPReceiver" objects to send or receive UDP packets over a network. When I deploy this function to a standalone executable using MATLAB Coder, and try to run the EXE file outside the MATLAB environment, I get below error:
ERROR: Could not open library: networkdevice.dll.To run the generated code outside the MATLAB environment, use the packNGo function.
The same thing happens if I have a Simulink model which sends data using a "UDP Send" block, or receives data using a "UDP Receive" block, and I generate an executable using Embedded Coder. Upon running the EXE file, the application silently exits, and no UDP data is sent or received.
Best Answer