在Visual Studio 2010上安装LibCurl [英] Installing LibCurl on Visual Studio 2010

查看:296
本文介绍了在Visual Studio 2010上安装LibCurl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中使用LibCurl时遇到了一些麻烦。记住我对C ++很新。

I've been having a bit of trouble using LibCurl with Visual Studio 2010. Keep in mind I'm pretty new to C++.

我建立了库到libcurl网站上的说明,并试图将我的项目指向include目录libcurl.lib等,但是当我尝试建立该项目时,我得到一堆LNK2019错误。

I built the library according to the instructions on the libcurl website and tried to point my project to the include directory, libcurl.lib, etc but when I try to build the project I get a bunch of LNK2019 errors.

有人可以告诉我如何告诉Visual Studio在哪里的include文件,.lib文件等(即构建LibCurl后使用示例代码在测试项目中的所有步骤)?

Can someone please walk me through how to tell Visual Studio where the include files, .lib file, etc are (i.e. all the steps after building LibCurl up to using sample code in a test project)?

提前感谢。

推荐答案


错误LNK2001:unresolved外部符号 __ imp__send @ 16

Hurray,我们有错误讯息。将ws2_32.lib添加到其他依赖关系设置。 MSDN库为每个API函数在文章底部列出了所需的导入库。

Hurray, we have an error message. Add ws2_32.lib to the Additional Dependencies setting. The MSDN Library lists the required import library at the bottom of the article for each API function.

解释链接器错误对诊断这些错误很重要。忽略 __ imp __ 前缀,这是链接器胶水。你可以告诉它试图找到send()函数的定义。这是一个标准的套接字API函数。发送()的MSDN库文章告诉我,你需要添加ws2_32.lib到依赖项。文章在这里,请滚动到底端。这些信息也应在图书馆文档中提供。

Interpreting the linker error is important to diagnose these errors. Ignore the __imp__ prefix, that's linker glue. You can tell it is trying to find the definition of the send() function. That's a standard socket API function. The MSDN Library article for send() told me you need to add ws2_32.lib to the dependencies. The article is here, scroll to the bottom. This same information should also be available in the library documentation.

这篇关于在Visual Studio 2010上安装LibCurl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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