Linking with Winsock
Using Visual C++ 6.0 I'm having problems with linking to the functions in winsock.h
All I've done in the file is #include <winsock.h>, and I get a good 7 or so errors during the linking stage that read:
main.obj : error LNK2001: unresolved external symbol _accept@12
and so on, fo all the different winsock functions. I figure I'm supposed to tell it to link with a winsock library somewhere, but I don't know where.
So all I need is for someone to tell me where to go to tell it to link with these functions, and what file I must link with, thanks.
For winsock 1.x: wsock32.lib
For winsock 2.x: ws2_32.lib
Add this line towards the head of your main cpp file: #pragma comment(lib, "wsock32.lib")
Thanks very much, that worked perfectly!