iDevGames Forums
Using libcurl on iPhone.. - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Using libcurl on iPhone.. (/thread-5.html)



Using libcurl on iPhone.. - Jamie W - Jul 3, 2010 04:09 AM

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,


RE: Using libcurl on iPhone.. - michaeltoy - Jul 5, 2010 09:11 PM

(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



RE: Using libcurl on iPhone.. - JohnEdward - Jan 25, 2011 02:41 AM

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.