I’ve just tried to compile using VSCode and MinGW and while I had to do some minor modifications to the udp_socket.hpp, I did not encounter the problem you have. I was able to compile the program and execute it.
Where did you take the installer for MinGW and what libraries did you install?
Please note that we provide a project file for Microsoft Visual Studio 2015 (you can also use 2019). It should be much easier to compile without having to modify anything.