帮忙解决一下
#include "stdafx.h"
我新建了一个win32 console application,选择a simple application然后我添加了两行代码
// dddd.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "winsock2.h"//我加的
WSADATA wsa;
int main(int argc, char* argv[])
{
WSAStartup(WORD(2), &wsa);//我加的
return 0;
}
然后编译,产生如下连接错误
dddd.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/dddd.exe : fatal error LNK1120: 1 unresolved externals
我的目的是想在控制台下使用socket,我调用socket函数同样会有找不到实现函数的错误,怎么解决,急!