WSAStartup链接错误 [英] WSAStartup link error

查看:311
本文介绍了WSAStartup链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用EVC ++,并且我想编译使用套接字的程序. 我已经包含

I am using EVC++ and I want to compile the program which uses the sockets. I've included

#include <winsock2.h>

我在项目属性中包含了Ws2.lib的路径 但仍然在链接步骤出现错误:

And I have included in project properties a path to Ws2.lib But still get the error at link step:

错误LNK2019:函数...中引用了无法解析的外部符号WSAStartup

error LNK2019: unresolved external symbol WSAStartup referenced in function ...

如何解决此问题?

推荐答案

#pragma comment(lib,"WS2_32") 毕竟#include

这篇关于WSAStartup链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆