Something question about kNet

Hi everyone!
I am rewriting a online game with Urho3D_1.7.1, and the original project is writed use Unity3D(C#, TCP).

  1. So I want to know if possible use kNet in client without the [Subsystem Network Of Urho3D],(the server side does not need to be modified).

  2. And when I do a test like this :

void GameTest::Start() {

GetSubsystem()->SetMouseVisible(true);
GetSubsystem()->SetMouseMode(MM_FREE);

kNet::TCPMessageConnection tcp_test();

}

the error is :

#error: Error: Trying to include winsock2.h after windows.h! This is not allowed! See this file for fix instructions. client_ C:\Users\tsin\Desktop\Urho3D-1.7.1\include\Urho3D\ThirdParty\kNet\win32\WS2Include.h 33

I have no experience on win socket,who can help me? I just want to build a demo that works well.

Check where the winsock inclusion is and just remove it? Pretty sure windows.h already has a #include for winsock.

Perhaps this can help?

I solved this by add:

#define WINSOCKAPI

and I will try mingw also, thanks