[英]C++ How to link LibCurl in Visual Studio 2010
I just downloaded a zip file from LibCurl's official site. 我刚刚从LibCurl的官方网站下载了一个zip文件。 In it there are 4 folders: include, bin, lib and samples.
其中有4个文件夹:include,bin,lib和sample。 I know I need to link my VS2010 project with them.
我知道我需要将我的VS2010项目与其链接。 I linked the include folder but I can't find how to link the lib folder.
我链接了include文件夹,但找不到如何链接lib文件夹。 And in it there are files with extension .A .
其中包含扩展名为.A的文件。 Is this normal?
这正常吗? Any help will be appreciated.
任何帮助将不胜感激。
在项目属性->链接器->输入->其他依赖项下
Follow the following steps: 请按照以下步骤操作:
Make sure you download the Windows version, not Linux, as @MartinPerry mentioned (as .A
is a Linux file). 确保下载Windows版本,而不是@MartinPerry提到的Linux(因为
.A
是Linux文件)。
Add its include
folder to your VS2010 include paths: Proprieties > VC++ Directories > Include Directories
. 将其
include
文件夹添加到VS2010包含路径: Proprieties > VC++ Directories > Include Directories
。
Add its lib
folder to your VS2010 library paths: Proprieties > VC++ Directories > Library Directories
. 将其
lib
文件夹添加到VS2010库路径: Proprieties > VC++ Directories > Library Directories
。
Add all the libs
you linked to Linker > Input > Additional Dependencies
. 添加链接到
Linker > Input > Additional Dependencies
所有libs
。
If it still doesn't work, you may also need to: 如果仍然无法使用,您可能还需要:
**5. ** 5。 Add its
bin
folder to your VS2010 executable paths: Proprieties > VC++ Directories > Executable Directories
. 将其
bin
文件夹添加到VS2010可执行路径中: Proprieties > VC++ Directories > Executable Directories
。
Edit : The above steps should work for many 3rd-party libraries for VS in Windows. 编辑 :上述步骤适用于Windows中VS的许多第三方库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.