为什么会出现链接错误在我的C程序ws2_32.dll中? [英] Why am I getting linker errors for ws2_32.dll in my C program?
本文介绍了为什么会出现链接错误在我的C程序ws2_32.dll中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Visual Studio 2010中写我的计划。
我无法一个名为 ws2_32.dll中
链接与我的项目。
I am writing my program in Visual Studio 2010.
I am unable to link a file named ws2_32.dll
with my project.
谁能告诉我,我该怎么办呢?
Can anyone tell me how I can do that?
推荐答案
通常你不链接给ws2_32.dll的直接但是WS2_32.LIB,您可以在Windows SDK中找到。因此,在您code你写
Typically you dont link to ws2_32.dll directly but to WS2_32.Lib, which you can find in the Windows SDK. So in your code you write
#include <winsock2.h>
和你连接的设置添加WS2_32.LIB,你是好去。
and to your linker-settings you add WS2_32.Lib and you're good to go.
在Windows SDK是在这里:
The Windows SDK is here:
<一个href=\"http://msdn.microsoft.com/en-us/windows/bb980924.aspx\">http://msdn.microsoft.com/en-us/windows/bb980924.aspx
这篇关于为什么会出现链接错误在我的C程序ws2_32.dll中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文