Hullo,
Beginning on my quest to learn Winsock, I've come across my first hitch. Sadly, it's pretty much my first line of code.
According to...I forget which tutorial it was now, but there was one out there (I think BJee) that said the only header I need to include is:
<winsock.h>
I'm beginning to believe this is not the case. I've created a Win32 Console Application in VC++ 6.0.
My code looks like:
Code:
#include <winsock.h>
void main(void)
{
const int WinsockVersion = 2;
WSADATA wsaData;
if (WSAStartup(MAKEWORD(WinsockVersion, 0), &wsaData) == 0)
{
//Winsock goes in here
}
if (WSACleanup()!=0)
{
}
}
But, sadly, it does not run, giving me these errors:
Compiling...
Main.cpp
Linking...
Main.obj : error LNK2001: unresolved external symbol _WSACleanup@0
Main.obj : error LNK2001: unresolved external symbol _WSAStartup@8
Debug/Winsock.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Creating browse info file...
No clue what I need to do. I'm thinking I may have missed some header? But no tutorials have told me which one.