Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with ws2tcpip.h #504

Open
jayanh opened this issue Aug 30, 2018 · 3 comments
Open

Error with ws2tcpip.h #504

jayanh opened this issue Aug 30, 2018 · 3 comments

Comments

@jayanh
Copy link

jayanh commented Aug 30, 2018

Hi! i compile sgminer on windows and got this issue

Does anyone know how to solve, please help

c:\mingw\include\ws2tcpip.h:16:2: error: #error "ws2tcpip.h is not compatible wi
th winsock.h. Include winsock2.h instead."
#error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead
."
^~~~~
In file included from c:\mingw\include\ws2tcpip.h:19:0,
from util.h:32,
from miner.h:29,
from compat.h:12,
from api.c:28:
c:\mingw\include\winsock2.h:49:2: error: #error "Including <winsock2.h> after is unsupported."
#error "Including <winsock2.h> after <winsock.h> is unsupported."
^~~~~
c:\mingw\include\winsock2.h:50:2: warning: #warning "Falling back to WinSock v1.
1 protocol." [-Wcpp]
#warning "Falling back to WinSock v1.1 protocol."
^~~~~~~
In file included from util.h:32:0,
from miner.h:29,
from compat.h:12,
from api.c:28:
c:\mingw\include\ws2tcpip.h:124:8: error: redefinition of 'struct ip_mreq'
struct ip_mreq {
^~~~~~~
In file included from c:\mingw\include\ptw32_errno.h:176:0,
from c:\mingw\include_ptw32.h:157,
from c:\mingw\include\pthread.h:76,
from compat.h:9,
from api.c:28:
c:\mingw\include\winsock.h:411:8: note: originally defined here
struct ip_mreq
^~~~~~~
In file included from util.h:32:0,
from miner.h:29,
from compat.h:12,
from api.c:28:
c:\mingw\include\ws2tcpip.h:298:13: error: expected '=', ',', ';', 'asm' or 'a
ttribute' before 'freeaddrinfo'
void WSAAPI freeaddrinfo (struct addrinfo*);
^~~~~~~~~~~~
c:\mingw\include\ws2tcpip.h:299:12: error: expected '=', ',', ';', 'asm' or 'a
ttribute' before 'getaddrinfo'
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
^~~~~~~~~~~
c:\mingw\include\ws2tcpip.h:301:12: error: expected '=', ',', ';', 'asm' or 'a
ttribute' before 'getnameinfo'
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
^~~~~~~~~~~
make[2]: *** [sgminer-api.o] Error 1
make[2]: Leaving directory /home/Administrator/sgminer' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/Administrator/sgminer'
make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jayanh and others