Notes for using libcurl in IOS

Source: Internet
Author: User

1. libcurl Library

The main function is to connect and communicate with different servers through different protocols ~ That is to say, sockPHP supports libcurl (which allows you to connect to and communicate with different servers using different protocols )., Libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and ldap protocols. Libcurl also supports HTTPS certificate authorization, http post, http put, FTP upload, HTTP basic form upload, proxy, cookies, and user authentication.

Second, an error is reported when libcurl is added to ios;

Undefined symbols for architecture i386:

"_ Inflate", referenced from:

_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)

"_ InflateEnd", referenced from:

_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)

_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)

_ Curl_unencode_cleanup in libcurl. a (libcurl_la-content_encoding.o)

"_ InflateInit2 _", referenced from:

_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)

_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)

"_ InflateInit _", referenced from:

_ Curl_unencode_deflate_write in libcurl. a (libcurl_la-content_encoding.o)

"_ ZlibVersion", referenced from:

_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)

Ld: symbol (s) not found for architecture i386

Clang: error: linker command failed with exit code 1 (use-v to see invocation)

Solution:

Add to database: libz. dylib

Explanation of this database:

1. dylib indicates that this is a dynamic link library.

2. libz. dylib is a library that provides zip compression and decompression.

3. For the library interface, # import "zlib. h"


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.