microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.81k stars 5.37k forks source link

Link error, Hiredis on windows #500

Open std-vector opened 8 years ago

std-vector commented 8 years ago

Hello, I'm trying to make Hiredis work in my project on windows, but I get some Link errors. I've tryed many ways that pasted on the Internet to solve these errors, neither of them works. So, could anyone give some advises for me ?

Ws2_32.lib(WS2_32.dll) : error LNK2005: getpeername already defined in win32_interop.lib(win32_fdapi.obj) Ws2_32.lib(WS2_32.dll) : error LNK2005: htons already defined in win32_interop.lib(win32_fdapi.obj) Ws2_32.lib(WS2_32.dll) : error LNK2005: ntohs already defined in win32_interop.lib(win32_fdapi.obj) Ws2_32.lib(WS2_32.dll) : error LNK2005: setsockopt already defined in win32_interop.lib(win32_fdapi.obj) Ws2_32.lib(WS2_32.dll) : error LNK2005: accept already defined in win32_interop.lib(win32_fdapi.obj) Ws2_32.lib(WS2_32.dll) : error LNK2005: bind already defined in win32_interop.lib(win32_fdapi.obj) ...

I'm using MSVC 2015, building for x64 platform. And it works well on linux in the same project. Thanks a lot. Walter