2
c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/ws2tcpip.h:38:2: error
: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instea
d."

I been trying to compile an alt coin that is of keccak sha 3 algorithm, but I keep get this error when trying to compile, it say ws2tcpip.h is not compatible with winsock.h , been trying for the past 2-3 days, but still not able get past this.

Got once I tried to replace ws2tcpip.h file with winsock2.h content, end up I get an error at netbase.cpp where it require the header of ws2tcpip.h on getaddrinfo

Hope someone can help on how to resolve this. I trying to fork max coin . Thanks !

2 Answers 2

4

windows.h includes winsock.h so you'll need to put the ws2tcpip.h include before any windows.h include.

1

Alternatively to danron's answer you can include winsock2.h in any order as long as WIN32_LEAN_AND_MEAN is defined

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.