0

I have duplicate definition in my project for winsock2, I know it's about winsock.h is included in windows.h and I have to include winsock2.h before windows.h and winsock.h, but I've done and still have the errors. EDIT : I also tried WIN32_LEAN_AND_MEAN with the same problem.

How can I find where winsock.h is included, isn't there a "inclusion tree" somewhere ?

I erased winsock.h and it works, but I don't like that way.

Entretoize
  • 2,124
  • 3
  • 23
  • 44

1 Answers1

0

You can define WIN32_LEAN_AND_MEAN before #include <windows.h> to not pull in winsock1.

Mestkon
  • 3,532
  • 7
  • 18