Giter VIP home page Giter VIP logo

curl-ssl-for-ios's Introduction

Introduction

OpenSSL and libcurl for Latest iOS.

Usage

  1. do "sh build-libraries.sh"

  2. libraries are created at "lib".

  3. Copy libs and headers to your project.

  4. Import "libssl.a", "libcrypto.a", "libcurl.a".

  5. Reference Headers, "Headers/openssl", "Headers/curl".

  6. Specifying the flag "-lz" in "Other Linker Flags" (OTHER_LDFLAGS) setting in the "Linking" section in the Build settings of the target.

  7. If use cURL, see below,

    #include <curl/curl.h>
    
    - (void)foo {    
        CURL* cURL = curl_easy_init();  
        ...  
    }
    

curl-ssl-for-ios's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curl-ssl-for-ios's Issues

why not create lib&header file?

wonhee-ui-Mac-Pro:cURL-SSL-for-iOS mario$ sudo sh build-libraries.sh
Start building libraries.
Using openssl-1.0.0d.tar.gz
Building openssl for iPhoneSimulator 4.3 i386
Please stand by...
Configure openssl for iPhoneSimulator 4.3 i386
Make openssl for iPhoneSimulator 4.3 i386
Using curl-7.21.5.tar.gz
Building libcurl for iPhoneSimulator 4.3 i386
Please stand by...
Configure libcurl for iPhoneSimulator 4.3 i386
Copy libraries to 'lib' directory.
cp: /Users/mario/Documents/cURL-SSL-for-iOS/OpenSSL/libcrypto.a: No such file or directory
cp: /Users/mario/Documents/cURL-SSL-for-iOS/OpenSSL/libssl.a: No such file or directory
cp: /Users/mario/Documents/cURL-SSL-for-iOS/OpenSSL/include/openssl: No such file or directory
cp: /Users/mario/Documents/cURL-SSL-for-iOS/cURL/libcurl.a: No such file or directory
cp: /Users/mario/Documents/cURL-SSL-for-iOS/cURL/include/curl: No such file or directory
Building libraries done.
wonhee-ui-Mac-Pro:cURL-SSL-for-iOS mario$

Unable to Create static library files

Hey, I am using Xcode 4.3.1 with SDK 5.1. In build-libcurl.sh I changed the SDK version to 5.1 and same with OpenSSL. but I tried to compile it using build-libraries.sh... libcurl.a and other 2 files are not created.. Kindly help me with the same. Thanks

Error building cURL for armv7 architecture

I'm trying to build cURL from sources for the device (armv7). Here's what I do (part of the build script):

export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc"
export CFLAGS="-arch ${ARCH} -isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERS ION}.sdk -I${OPENSSL}/include -L${OPENSSL}"

./configure -prefix=${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk --host=${ARCH}-apple-darwin --disable-shared -with-random=/dev/urandom --with-ssl > "${LOG}" 2>&1

make
make install
make clean

However, make fails with following error:

netrc.c: In function 'Curl_parsenetrc':
netrc.c:90: warning: assignment makes pointer from integer without a cast
netrc.c:95: error: dereferencing pointer to incomplete type
make[2]: *** [libcurl_la-netrc.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Also, I see errors in config.log like:

configure:5177: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope r/usr/bin/gcc -c -arch armv7 -isysroot /Applications/Xcode45-DP1.app/Contents/Developer/Platforms/iPhoneOS.platform/De veloper/SDKs/iPhoneOS5.0.sdk -I/OpenSSL/include -L/OpenSSL conftest.c >&5
conftest.c: In function 'main':
conftest.c:60: error: size of array 'test_array' is negative
configure:5177: $? = 1
configure: failed program was:
| /* confdefs.h */

By the way, this builds and works fine for i386 architecture, i.e., on the iOS simulator.

What can I do to get it to build for the iPhone (armv7)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.