libcurl.dll 与curl 和 c# .NET 的问题
我需要开发用于获取http网站页面的应用程序
我找到了在.Net中使用curl的教程
http://thedotnetframework.blogspot.com/2008/06/lets-talk-about-http-protocol-and-http.html
我下载了curl dll文件并将引用(LibCurlNet.dll)添加到我的项目中
,并在我的项目中添加了该类
,但是当我运行我的项目时,我在行中收到错误消息,
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
错误消息显示
Unable to load DLL 'libcurl.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
ibcurl.dll 似乎有问题
注意:我无法添加(ibcurl.dll)作为我的项目中的参考,
请帮忙;
I Need to develpe application for getting http website page
I found this tutorial for using curl in .Net
http://thedotnetframework.blogspot.com/2008/06/lets-talk-about-http-protocol-and-http.html
I downloaded the curl dll files and add reference (LibCurlNet.dll) to my project
and added the class in my project
but when I run my project, I have error message at line
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
the error message says
Unable to load DLL 'libcurl.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
it seems that ibcurl.dll has a problem
note : I can not add (ibcurl.dll) as reference in my project
please help ;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您看到的错误是您需要该文件(和 LibCurlShim.dll)存在于您的构建目录(例如 bin\debug)或您的 exe 运行的任何位置。该文件没有问题 - 您只是无法在 Visual Studio 中以通常的方式将其添加为引用。
您可以右键单击 Project Explorer 并添加现有文件,然后选择 libcurl.dll 和 LibCurlShim.dll。然后在解决方案资源管理器中,在这两个文件的属性上,确保将
复制到输出目录
设置为始终复制或仅在较新时复制
The error you are seeing is that you need that file (and LibCurlShim.dll) present in your build directory (e.g. bin\debug) or wherever your exe is running from. There is no problem with the file - you just cannot add it as a reference in the usual way in Visual Studio.
You could right-click on Project Explorer and add Existing Files and select libcurl.dll and LibCurlShim.dll. Then in Solution Explorer, on the Properties of those two files make sure you set the
Copy To Output Directory
to something likeCopy Always or Only If Newer
您正在寻找内置的
WebClient类
。
您不需要任何第三方库。
You're looking for the built-in
WebClient
class.You don't need any third-party libraries.