Using libcurl on iPhone..

Member
Posts: 129
Joined: 2009.03
Post: #1
Hello,

I'm looking in to using libcurl on iPhone (partly to help maintain cross platform portability)..

Has anyone got experience either building a static library of libcurl for iPhone, and or, using libcurl successfully on iPhone?

Any advice or thoughts on that?

Thanks,
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2010.06
Post: #2
(Jul 3, 2010 04:09 AM)Jamie W Wrote:  Has anyone got experience either building a static library of libcurl for iPhone, and or, using libcurl successfully on iPhone?

Using using libcurl in the project I am working on. I also had to build a static copy of OpenSSL, so the configure for the build of libcurl refers to that. Here is the configure line I used:

Code:
export CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
export CFLAGS="-arch armv6 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk"
export CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp
export AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar

./configure --host=arm-apple-darwin \
        --disable-ldap --without-zlib --without-ca-bundle --without-ca-path \
        --disable-shared --enable-static --with-random=/dev/urandom \
        --with-ssl=/PATH-TO-STATIC-OPENSSL
Quote this message in a reply
Apprentice
Posts: 6
Joined: 2010.12
Post: #3
You have to download libcurl source from http://curl.haxx.se/download.html,Extract archive content from desktop, open the terminal and change the current directory to the libcurl path of desktop, To compile libcurl statically you must type the following command line in your terminal:./configure --disable-shared --without-ssl --without-libssh2 -without-ca-bundle.
Quote this message in a reply
Post Reply