在Android中使用cURL [英] Using cURL in Android

查看:1321
本文介绍了在Android中使用cURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Android应用程序中使用本地代码中的cURL库(使用NDK r5b,最新)。在线研究之后,似乎唯一的方法是使用cURL在Android中是构建整个Android源代码树与curl,在某种程度上,这会生成一个必要的配置文件为cURL工作在Android上。我没有从头开始构建Android源代码的任何经验,并想知道是否有一种方法使用cURL库在Android中,而不必从源重建android。理想情况下,能够只使用cURL作为静态或共享库将是完美的。我尝试按照此处提及的步骤操作...

I would like to use cURL library in my android application in native code (using NDK r5b, the latest). After researching online, it seems the only way to use cURL in android is to build the entire android source tree with curl in it, and somehow this generates a necessary config file for cURL to work on Android. I don't have any experience building the android sources from scratch and was wondering if there is a way to use cURL library in Android without having to rebuild android from source. Ideally, being able to just use cURL as a static or shared library would be perfect. I tried following the steps mentioned here...

http://curl.haxx.se/mail/lib-2009-12/0071.html

但结束在文件curlrules.h中出现错误,如 CURL_SIZEOF_LONG定义丢失了!

but end up getting errors in the file curlrules.h like CURL_SIZEOF_LONG definition is missing!

我假设这些错误是由于没有我提到的配置文件,但上述链接中的步骤没有提到任何和报告成功。任何想法?

I assume these errors are due to not having that config file I mentioned but the steps in the above link didn't mention any of that and reported success. Any ideas?

推荐答案

我有一个类似的任务!我正在开发一个应用程序,现在需要cURL,只是今晚在我的搜索我遇到你的帖子在这里,我相信是答案:

I'm on a similar quest! I'm working on an app right now that requires cURL and just tonight in my search I came across your post here, and what I believe to be the answer:

< a href =http://thesoftwarerogue.blogspot.com/2010/05/porting-of-libcurl-to-android-os-using.html =noreferrer> http://thesoftwarerogue.blogspot.com/ 2010/05 / porting-of-libcurl-to-android-os-using.html

与您引用的链接不同,来自其他声称拥有成功的人的评论也遵循指示。如果你设法得到它编译在我面前,并不介意给我图书馆,在这里发布一个跟进! (我很新的堆栈溢出,所以我不知道你是否可以下午。)希望这对我们两个!

Unlike the link you referenced, there are several follow-up comments from other people who claim to have success also following the instructions. If you manage to get it compiled before me, and wouldn't mind sending me the library, post a follow up here! (I'm pretty new to stack overflow so I don't know if you can pm.) Hope this works out for both of us!

这篇关于在Android中使用cURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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