Demion / nodevfee

NoDevFee Ethereum Miner Stratum Protocol DevFee Remover (Redirector)
170 stars 45 forks source link

Compilation error - Link related #41

Closed drdada closed 6 years ago

drdada commented 6 years ago

Hello,

I try to compile your code but i still get this: 1>------ Build started: Project: nodevfeeDll, Configuration: Debug Win32 ------ 1>main.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "void __cdecl OnConnect(unsigned int,struct sockaddr const *,int)" (?OnConnect@@YAXIPBUsockaddr@@H@Z) 1>main.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function "void __cdecl OnConnect(unsigned int,struct sockaddr const *,int)" (?OnConnect@@YAXIPBUsockaddr@@H@Z) 1>main.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "void __cdecl OnConnect(unsigned int,struct sockaddr const *,int)" (?OnConnect@@YAXIPBUsockaddr@@H@Z) 1>main.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "void __cdecl OnConnect(unsigned int,struct sockaddr const *,int)" (?OnConnect@@YAXIPBUsockaddr@@H@Z)

I think it's related with some missing link. I'm not so very familiar with c++.

Can you help me please ?

Thanks

Demion commented 6 years ago

Switch to Release x64 build or Project -> Properties -> Linker -> Input -> Additional Dependecies -> add ws2_32.lib More details here - https://github.com/Demion/nodevfee/issues/33

drdada commented 6 years ago

Yes, i just saw it.

Sorry for duplicate.

Thank you