Closed blaquee closed 11 months ago
The exact (and not so useful) message from Visual Studio is
Severity Code Description Project File Line Suppression State
Error C2872 'in_addr': ambiguous symbol
Winsock headers need to be included with a specific order:
#include <winsock2.h>
#include <ws2tcpip.h>
#include <ws2def.h>
#include <windns.h>
#include <nldef.h>
#include <iphlpapi.h>
#include <mstcpip.h>
#include <icmpapi.h>
For a project of mine I am using phnt and also winsock but for some reason I am getting an ambiguous symbol error during compilation due to
in_addr
and I noticed that this symbol is also defined in ntrtl, is there some way to work around this? I've tried everything from including winsock2 first and completely removing it (but then I would be missing the necessary symbols and functions I need).https://github.com/processhacker/phnt/blob/master/ntrtl.h#L5383