I rebuilt the libcurl library and ran otool. These are the dependencies of the static libcurl:
Code:
/usr/local/lib/libcurl.a(libcurl_la-file.o):
/usr/local/lib/libcurl.a(libcurl_la-timeval.o):
/usr/local/lib/libcurl.a(libcurl_la-base64.o):
/usr/local/lib/libcurl.a(libcurl_la-hostip.o):
/usr/local/lib/libcurl.a(libcurl_la-progress.o):
/usr/local/lib/libcurl.a(libcurl_la-formdata.o):
/usr/local/lib/libcurl.a(libcurl_la-cookie.o):
/usr/local/lib/libcurl.a(libcurl_la-http.o):
/usr/local/lib/libcurl.a(libcurl_la-sendf.o):
/usr/local/lib/libcurl.a(libcurl_la-ftp.o):
/usr/local/lib/libcurl.a(libcurl_la-url.o):
/usr/local/lib/libcurl.a(libcurl_la-dict.o):
/usr/local/lib/libcurl.a(libcurl_la-if2ip.o):
/usr/local/lib/libcurl.a(libcurl_la-speedcheck.o):
/usr/local/lib/libcurl.a(libcurl_la-ldap.o):
/usr/local/lib/libcurl.a(libcurl_la-version.o):
/usr/local/lib/libcurl.a(libcurl_la-getenv.o):
/usr/local/lib/libcurl.a(libcurl_la-escape.o):
/usr/local/lib/libcurl.a(libcurl_la-mprintf.o):
/usr/local/lib/libcurl.a(libcurl_la-telnet.o):
/usr/local/lib/libcurl.a(libcurl_la-netrc.o):
/usr/local/lib/libcurl.a(libcurl_la-getinfo.o):
/usr/local/lib/libcurl.a(libcurl_la-transfer.o):
/usr/local/lib/libcurl.a(libcurl_la-strcase.o):
/usr/local/lib/libcurl.a(libcurl_la-easy.o):
/usr/local/lib/libcurl.a(libcurl_la-security.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_fnmatch.o):
/usr/local/lib/libcurl.a(libcurl_la-fileinfo.o):
/usr/local/lib/libcurl.a(libcurl_la-ftplistparser.o):
/usr/local/lib/libcurl.a(libcurl_la-wildcard.o):
/usr/local/lib/libcurl.a(libcurl_la-krb5.o):
/usr/local/lib/libcurl.a(libcurl_la-memdebug.o):
/usr/local/lib/libcurl.a(libcurl_la-http_chunks.o):
/usr/local/lib/libcurl.a(libcurl_la-strtok.o):
/usr/local/lib/libcurl.a(libcurl_la-connect.o):
/usr/local/lib/libcurl.a(libcurl_la-llist.o):
/usr/local/lib/libcurl.a(libcurl_la-hash.o):
/usr/local/lib/libcurl.a(libcurl_la-multi.o):
/usr/local/lib/libcurl.a(libcurl_la-content_encoding.o):
/usr/local/lib/libcurl.a(libcurl_la-share.o):
/usr/local/lib/libcurl.a(libcurl_la-http_digest.o):
/usr/local/lib/libcurl.a(libcurl_la-md4.o):
/usr/local/lib/libcurl.a(libcurl_la-md5.o):
/usr/local/lib/libcurl.a(libcurl_la-http_negotiate.o):
/usr/local/lib/libcurl.a(libcurl_la-inet_pton.o):
/usr/local/lib/libcurl.a(libcurl_la-strtoofft.o):
/usr/local/lib/libcurl.a(libcurl_la-strerror.o):
/usr/local/lib/libcurl.a(libcurl_la-amigaos.o):
/usr/local/lib/libcurl.a(libcurl_la-hostasyn.o):
/usr/local/lib/libcurl.a(libcurl_la-hostip4.o):
/usr/local/lib/libcurl.a(libcurl_la-hostip6.o):
/usr/local/lib/libcurl.a(libcurl_la-hostsyn.o):
/usr/local/lib/libcurl.a(libcurl_la-inet_ntop.o):
/usr/local/lib/libcurl.a(libcurl_la-parsedate.o):
/usr/local/lib/libcurl.a(libcurl_la-select.o):
/usr/local/lib/libcurl.a(libcurl_la-tftp.o):
/usr/local/lib/libcurl.a(libcurl_la-splay.o):
/usr/local/lib/libcurl.a(libcurl_la-strdup.o):
/usr/local/lib/libcurl.a(libcurl_la-socks.o):
/usr/local/lib/libcurl.a(libcurl_la-ssh.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_addrinfo.o):
/usr/local/lib/libcurl.a(libcurl_la-socks_gssapi.o):
/usr/local/lib/libcurl.a(libcurl_la-socks_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-slist.o):
/usr/local/lib/libcurl.a(libcurl_la-nonblock.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_memrchr.o):
/usr/local/lib/libcurl.a(libcurl_la-imap.o):
/usr/local/lib/libcurl.a(libcurl_la-pop3.o):
/usr/local/lib/libcurl.a(libcurl_la-smtp.o):
/usr/local/lib/libcurl.a(libcurl_la-pingpong.o):
/usr/local/lib/libcurl.a(libcurl_la-rtsp.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_threads.o):
/usr/local/lib/libcurl.a(libcurl_la-warnless.o):
/usr/local/lib/libcurl.a(libcurl_la-hmac.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_rtmp.o):
/usr/local/lib/libcurl.a(libcurl_la-openldap.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_gethostname.o):
/usr/local/lib/libcurl.a(libcurl_la-gopher.o):
/usr/local/lib/libcurl.a(libcurl_la-idn_win32.o):
/usr/local/lib/libcurl.a(libcurl_la-http_proxy.o):
/usr/local/lib/libcurl.a(libcurl_la-non-ascii.o):
/usr/local/lib/libcurl.a(libcurl_la-asyn-ares.o):
/usr/local/lib/libcurl.a(libcurl_la-asyn-thread.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_gssapi.o):
/usr/local/lib/libcurl.a(libcurl_la-http_ntlm.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_ntlm_wb.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_ntlm_core.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_sasl.o):
/usr/local/lib/libcurl.a(libcurl_la-rand.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_multibyte.o):
/usr/local/lib/libcurl.a(libcurl_la-hostcheck.o):
/usr/local/lib/libcurl.a(libcurl_la-conncache.o):
/usr/local/lib/libcurl.a(libcurl_la-pipeline.o):
/usr/local/lib/libcurl.a(libcurl_la-dotdot.o):
/usr/local/lib/libcurl.a(libcurl_la-x509asn1.o):
/usr/local/lib/libcurl.a(libcurl_la-http2.o):
/usr/local/lib/libcurl.a(libcurl_la-smb.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_endian.o):
/usr/local/lib/libcurl.a(libcurl_la-curl_des.o):
/usr/local/lib/libcurl.a(libcurl_la-system_win32.o):
/usr/local/lib/libcurl.a(libcurl_la-vauth.o):
/usr/local/lib/libcurl.a(libcurl_la-cleartext.o):
/usr/local/lib/libcurl.a(libcurl_la-cram.o):
/usr/local/lib/libcurl.a(libcurl_la-digest.o):
/usr/local/lib/libcurl.a(libcurl_la-digest_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-krb5_gssapi.o):
/usr/local/lib/libcurl.a(libcurl_la-krb5_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-ntlm.o):
/usr/local/lib/libcurl.a(libcurl_la-ntlm_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-oauth2.o):
/usr/local/lib/libcurl.a(libcurl_la-spnego_gssapi.o):
/usr/local/lib/libcurl.a(libcurl_la-spnego_sspi.o):
/usr/local/lib/libcurl.a(libcurl_la-openssl.o):
/usr/local/lib/libcurl.a(libcurl_la-gtls.o):
/usr/local/lib/libcurl.a(libcurl_la-vtls.o):
/usr/local/lib/libcurl.a(libcurl_la-nss.o):
/usr/local/lib/libcurl.a(libcurl_la-polarssl.o):
/usr/local/lib/libcurl.a(libcurl_la-polarssl_threadlock.o):
/usr/local/lib/libcurl.a(libcurl_la-axtls.o):
/usr/local/lib/libcurl.a(libcurl_la-cyassl.o):
/usr/local/lib/libcurl.a(libcurl_la-schannel.o):
/usr/local/lib/libcurl.a(libcurl_la-darwinssl.o):
/usr/local/lib/libcurl.a(libcurl_la-gskit.o):
/usr/local/lib/libcurl.a(libcurl_la-mbedtls.o):
Running otool on the static library is unlikely to provide anything useful. The evidence above confirms this.
The goal here is simply to discover the libraries that libcurl itself depends on.
The ways I can think of to do this are:
1. It might be in libcurl's documentation.
2. If libcurl has a makefile, it's almost certainly in there.
3. It would be embedded in libcurl.dylib.
If you haven't checked libcurl's documentation, you can try that.
EDIT
I googled the search terms: libcurl external libraries
The top hit was this page, which lists all of curl's library dependencies:
https://curl.haxx.se/docs/libs.html
So given the libs named there, you'll need to add them to the list of libraries that your app links with. Doing this should resolve all the unresolved symbols from libcurl. If it doesn't, post the error message.
Note: That list is for 'curl' the command-line-tool, not libcurl the library. You can probably omit some of the libraries named in that list. Exactly which ones to omit can be discovered by running otool on libcurl.dylib, or looking in libcurl's makefile, or possibly a more detailed search of libcurl's documentation.
If there was a makefile included with libcurl's source, then it's almost certain that the external libraries libcurl needs will be named there. The reason this is almost certain is that unresolved symbols would prevent libcurl.dylib from linking correctly. Therefore, every external library dependency needed to link libcurl.dylib would have to be in the makefile. The fact that you want to
statically link libcurl is irrelevant here. You're only trying to discover what other libs libcurl needs. Once you have all those other libs at hand, then libcurl will correctly link, for both dylib and static versions.