I made a new project with FIPv4Address ip(127, 0, 0, 1);
line and tested it with include I mentioned and saw errors you showed. I poked around a little bit more and was able to come up with what may actually be a better solution for you.
Open your project’s Build.cs file and add "Networking"
to public dependency module names.
Then add #include "Networking.h"
to file where you are using networking code. This header file actually includes SocketSubsystem.h
and IPv4Address.h
, so you should be able to remove those includes. I believe you will still need to keep IPAddress.h
include, but you can try removing that as well.
When I followed those steps, build errors related to IPv4Address cleared up.