Any time I try to use more than 1 networking library in the same (CMake) project, there are many Winsock redefinition errors. These libraries are asio, SteamAPI, libssh, and SDL_net to name a few.
I turned to Google for answers, and there are many posts regarding this issue. Many people have proposed how to fix this such as defining WIN32_LEAN_AND_MEAN before including Windows.h, or not including Windows.h twice... I have removed all usages of Windows.h. I have also tried many variations of the answers in the hope of getting my program to compile. This makes no difference.
Among all of the available answers, there is not one single answer that solves this issue. Most of the answers do point to this being a WindowsAPI-only issue due to it trying to include the old Winsock.h.
Is there any way to use the networking libraries mentioned above simultaneously without these errors?

I believe I have discovered a solution to this problem. It involves modifying
Windows.hlocated inC:\Program Files (x86)\Windows Kits\10\Include\<version>\um.This works because all of the gunk that
Windows.hincludes is located within the#ifndefsection forWIN32_LEAN_AND_MEAN, includingWinsock.h.Using a text editor, remove the
#ifndef WIN32_LEAN_AND_MEANsection. It should be about 21 lines in length. Once removed, add `#include <Winsock2.h> to where the section was. Your computer might ask for permissions to save the file.This worked for me, and I cannot assure it will work for you, but it very much should. Hope this helps.