Kód: Vybrať všetko
#include<windows.h>
#include<winsock.h>
#include<iostream>
using namespace std;
int main()
{
WSADATA data; //winsock will fill this with structure with information
int status;
telnet *tel;
//just this function to see if the winsock.dll is initialized
status=WSAStartup(MAKEWORD(2,2),&data);
tel=gethostbyname("server.sk");
if(status==0)
{
cout<<"Socket created."<<endl;
}
else
{
cout<<"Error code:"<<GetLastError()<<endl;
WSACleanup();
}
return 0;
}
vyhodi chybu
Kód: Vybrať všetko
unresolved external symbol _WSACleanup@0 referenced in function _main