在Win32程序中使用WSAStartup的问题
hncal 2003-10-21 11:25:46 我在Win32程序中使用WSAStartup初始化时程序会报二个错误内容如下:
C_Demo.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/C_Demo.exe : fatal error LNK1120: 1 unresolved externals
我的代码为
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD( 2, 2 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) {
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
return;
}