Help,How can I get FSocket working?

That’s my codes :

 include "MyPawn.h"
 include "Runtime/Engine/Classes/Camera/CameraComponent.h "
 include "Runtime/Sockets/Public/Sockets.h"
 include "Runtime/Sockets/Public/SocketSubsystem.h "
 FSocket* psocket;
 AMyPawn::AMyPawn() {
  PrimaryActorTick.bCanEverTick = true;
  AutoPossessPlayer = EAutoReceiveInput::Player0;
  
  psocket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("default"), false); // *********Compile success if without this line********
 }

And that’s my erros :

MyPawn.cpp.obj : error LNK2019:
?޷???ⲿ??? "__declspec(dllimport)
public: static class ISocketSubsystem

  • __cdecl ISocketSubsystem::Get(class FName const &)"
    (_imp?Get@ISocketSubsystem@@SAPEAV1@AEBVFName@@@Z)???÷???ں???
    “public: virtual void __cdecl
    AMyPawn::Tick(float)”
    (?Tick@AMyPawn@@UEAAXM@Z) ?б???
    D:\Unreal
    Projects\HowTo_PlayerInput\Binaries\Win64\UE4Editor-HowTo_PlayerInput-3221.dll
    : fatal error LNK1120: 1
    ???޷???ⲿ???

I’m a noob , thanks 4 u help !

I fixed it .

There is a file in ue4 project , It’s
name is ‘Project Name’.build.cs.

add “Sockets” and “Networking” into it
. Then project can be compile successfully .

Like this :

using UnrealBuildTool;

public class HowTo_PlayerInput : ModuleRules
{
	public HowTo_PlayerInput(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
	
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore",
                                                                                                    "Sockets",//new item
                                                                                                    "Networking"//new item
            });

		PrivateDependencyModuleNames.AddRange(new string[] {  });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");

		// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
	}
}