#include "networking.h" cannot open file

I’m having a problem with the #include “networking.h”, VS says it cannot open the file. When I build the project under Visual Studio Express 2013, it give me a bunch of errors about undefined FIPv4Endpoint. However, compiling in the Unreal Engine interface it works fine.
Any idea??
Thank you.


You must add “Networking” to your build.cs project.

 PublicDependencyModuleNames.AddRange(new string[] { "Networking", "Some other depends"});

Best regards,

1 Like

I’m sorry but I already added Networking and Socket to the PublicDependencyModuleNames.
Any more idea???
Thank you

Do you solve your problem?

Try this
#include “Runtime/Networking/Public/Networking.h”
if this work add the Runtime directory to your include path

I may or may not be having the same issue, but doing the above fixes that error, but then more pop up for the includes inside of Networking.h - Sockets.h, IPv4SubnetMask.h, SteamEndpoint.h, etc. So VC isn’t looking in the right directory somewhere. I haven’t figured out where it needs to look or how to add it.

After adding it to the PublicDependencyModuleNames you have to save the project, exit Visual Studio and the rightclick your .uproject file and hit “Generate Visual Studio project files”.
Then it should work. :slight_smile:

Great, thanks. VS will prompt you to reload the project, so you don’t technically need to close it :slight_smile: