On Fri, Jul 6, 2012 at 9:07 AM, Ozkan Sezer wrote: >>>> -lwsock32 -lws2_32 -liberty -o streamer-ml-monl-chunkstream-static.exe >>> >>> You aren't supposed to link to both wsock32 and ws2_32: >>> only to one which you are supposed to be using. >> >> And you should be using ws2_32 (WinSOCK version 2) and not wsock32 >> (WinSOCK version 1). > > No, that depends on which header he is including, winsock.h or winsock2.h: > Not many, but there are a few constants that are different across the two > versions. If he is including winsock.h (or including it implicitly by just > including windows.h without WIN32_LEAN_AND_MEAN defined) then wsock32 is > needed. Otherwise if he is including winsock2.h (which needs to be included > before windows.h, BTW) then ws2_32 is needed.
Correct but winsock2 is preferred. http://msdn.microsoft.com/en-us/library/windows/desktop/ms741412(v=vs.85).aspx -- Earnie -- https://sites.google.com/site/earnieboyd ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public