在iOS平台使用libcurl
我们在开发一个独立的公共库,里面要用到libcurl,老大做好了windows版本,我来维护iOS版,于是去cocos2dx下面扒拉来了对应的include文件以及libcurl.a(windows版也是从这里扒拉过来的),跑之编不过,报这样的错误:
Undefined symbols for architecture i386:
"_inflate", referenced from:
_inflate_stream in libCTLib.a(libcurl_la-content_encoding.o)
"_inflateEnd", referenced from:
_inflate_stream in libCTLib.a(libcurl_la-content_encoding.o)
_Curl_unencode_gzip_write in libCTLib.a(libcurl_la-content_encoding.o)
_Curl_unencode_cleanup in libCTLib.a(libcurl_la-content_encoding.o)
"_inflateInit2_", referenced from:
_inflate_stream in libCTLib.a(libcurl_la-content_encoding.o)
_Curl_unencode_gzip_write in libCTLib.a(libcurl_la-content_encoding.o)
"_inflateInit_", referenced from:
_Curl_unencode_deflate_write in libCTLib.a(libcurl_la-content_encoding.o)
"_zlibVersion", referenced from:
_Curl_unencode_gzip_write in libCTLib.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)