其实出错是因为curl链接的时候需要别的库。我用如下方法解决

1、http://curl.haxx.se/download/curl-7.45.0.tar.gz官网下载源码

2、./configure --disable-ldap --disable-ldaps

make

cp ./lib/.libs/libcurl.a ../pathto/project

3、链接时加参数:-lidn -lrt -lcrypto -lssl

如:-lidn -lrt -lcrypto -lssl ./lib/libcurl.a

参考:

http://blog.csdn.net/langeldep/article/details/6223649

http://blog.csdn.net/pingd/article/details/46120749

附录:错误信息是下面这样的,由于太长,我把解决方法写在上面。

./lib/libcurl.a(libcurl_la-content_encoding.o): In function `exit_zlib':
content_encoding.c:(.text+0x135): undefined reference to `inflateEnd'
./lib/libcurl.a(libcurl_la-content_encoding.o): In function `inflate_stream':
content_encoding.c:(.text+0x24e): undefined reference to `inflate'
content_encoding.c:(.text+0x2b9): undefined reference to `inflateEnd'
content_encoding.c:(.text+0x2d2): undefined reference to `inflateInit2_'
content_encoding.c:(.text+0x361): undefined reference to `inflateEnd'
./lib/libcurl.a(libcurl_la-content_encoding.o): In function `Curl_unencode_gzip_write':
content_encoding.c:(.text+0x468): undefined reference to `zlibVersion'
content_encoding.c:(.text+0x49f): undefined reference to `inflateInit2_'
content_encoding.c:(.text+0x4f5): undefined reference to `inflateInit2_'
./lib/libcurl.a(libcurl_la-content_encoding.o): In function `Curl_unencode_deflate_write':
content_encoding.c:(.text+0x717): undefined reference to `inflateInit_'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_disconnect':
openldap.c:(.text+0x5a): undefined reference to `ldap_unbind_ext'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_connecting':
openldap.c:(.text+0x10e): undefined reference to `ldap_result'
openldap.c:(.text+0x149): undefined reference to `ldap_parse_result'
openldap.c:(.text+0x171): undefined reference to `ldap_get_option'
openldap.c:(.text+0x18b): undefined reference to `ldap_memfree'
openldap.c:(.text+0x1ac): undefined reference to `ldap_set_option'
openldap.c:(.text+0x1ee): undefined reference to `ldap_sasl_bind'
openldap.c:(.text+0x260): undefined reference to `ldap_get_option'
openldap.c:(.text+0x279): undefined reference to `ber_sockbuf_add_io'
openldap.c:(.text+0x2ba): undefined reference to `ldap_err2string'
openldap.c:(.text+0x2e9): undefined reference to `ldap_memfree'
openldap.c:(.text+0x302): undefined reference to `ldap_memfree'
openldap.c:(.text+0x322): undefined reference to `ldap_err2string'
openldap.c:(.text+0x347): undefined reference to `ldap_err2string'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_recv':
openldap.c:(.text+0x4ce): undefined reference to `ldap_result'
openldap.c:(.text+0x4fd): undefined reference to `ldap_first_message'
openldap.c:(.text+0x514): undefined reference to `ldap_msgtype'
openldap.c:(.text+0x52d): undefined reference to `ldap_next_message'
openldap.c:(.text+0x549): undefined reference to `ldap_msgfree'
openldap.c:(.text+0x584): undefined reference to `ldap_get_dn_ber'
openldap.c:(.text+0x621): undefined reference to `ldap_get_attribute_ber'
openldap.c:(.text+0x7f1): undefined reference to `ber_memfree'
openldap.c:(.text+0x905): undefined reference to `ldap_err2string'
openldap.c:(.text+0x933): undefined reference to `ber_memfree'
openldap.c:(.text+0x93f): undefined reference to `ber_free'
openldap.c:(.text+0x94c): undefined reference to `ldap_msgfree'
openldap.c:(.text+0x991): undefined reference to `ber_free'
openldap.c:(.text+0x9cc): undefined reference to `ldap_parse_result'
openldap.c:(.text+0xa00): undefined reference to `ldap_err2string'
openldap.c:(.text+0xa3e): undefined reference to `ldap_memfree'
openldap.c:(.text+0xa7b): undefined reference to `ldap_err2string'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_connect':
openldap.c:(.text+0xb58): undefined reference to `ldap_init_fd'
openldap.c:(.text+0xb63): undefined reference to `ldap_err2string'
openldap.c:(.text+0xbbf): undefined reference to `ldap_set_option'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_done':
openldap.c:(.text+0xc4f): undefined reference to `ldap_abandon_ext'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_do':
openldap.c:(.text+0xcbd): undefined reference to `ldap_url_parse'
openldap.c:(.text+0xd78): undefined reference to `ldap_search_ext'
openldap.c:(.text+0xd85): undefined reference to `ldap_free_urldesc'
openldap.c:(.text+0xdfb): undefined reference to `ldap_err2string'
./lib/libcurl.a(libcurl_la-openldap.o): In function `ldap_setup_connection':
openldap.c:(.text+0xe46): undefined reference to `ldap_url_parse'
openldap.c:(.text+0xe60): undefined reference to `ldap_pvt_url_scheme2proto'
openldap.c:(.text+0xe6c): undefined reference to `ldap_free_urldesc'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_sha256sum':
openssl.c:(.text+0x38): undefined reference to `SHA256_Init'
openssl.c:(.text+0x46): undefined reference to `SHA256_Update'
openssl.c:(.text+0x51): undefined reference to `SHA256_Final'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_md5sum':
openssl.c:(.text+0xa8): undefined reference to `MD5_Init'
openssl.c:(.text+0xb6): undefined reference to `MD5_Update'
openssl.c:(.text+0xc1): undefined reference to `MD5_Final'
./lib/libcurl.a(libcurl_la-openssl.o): In function `rand_enough':
openssl.c:(.text+0xf5): undefined reference to `RAND_status'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_seed':
openssl.c:(.text+0x143): undefined reference to `RAND_load_file'
openssl.c:(.text+0x18d): undefined reference to `RAND_egd'
openssl.c:(.text+0x1ba): undefined reference to `RAND_bytes'
openssl.c:(.text+0x1d2): undefined reference to `RAND_add'
openssl.c:(.text+0x1d7): undefined reference to `RAND_status'
openssl.c:(.text+0x1ed): undefined reference to `RAND_file_name'
openssl.c:(.text+0x201): undefined reference to `RAND_load_file'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_random':
openssl.c:(.text+0x27c): undefined reference to `RAND_bytes'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_version':
openssl.c:(.text+0x2b7): undefined reference to `SSLeay'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_data_pending':
openssl.c:(.text+0x39b): undefined reference to `SSL_pending'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ssl_ui_writer':
openssl.c:(.text+0x430): undefined reference to `UI_get_string_type'
openssl.c:(.text+0x440): undefined reference to `UI_get0_user_data'
openssl.c:(.text+0x44d): undefined reference to `UI_get_input_flags'
openssl.c:(.text+0x456): undefined reference to `UI_OpenSSL'
openssl.c:(.text+0x45e): undefined reference to `UI_method_get_writer'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ssl_ui_reader':
openssl.c:(.text+0x49d): undefined reference to `UI_get_string_type'
openssl.c:(.text+0x4ad): undefined reference to `UI_get0_user_data'
openssl.c:(.text+0x4bd): undefined reference to `UI_get_input_flags'
openssl.c:(.text+0x4c6): undefined reference to `UI_OpenSSL'
openssl.c:(.text+0x4ce): undefined reference to `UI_method_get_reader'
openssl.c:(.text+0x4fa): undefined reference to `UI_set_result'
./lib/libcurl.a(libcurl_la-openssl.o): In function `SSL_strerror':
openssl.c:(.text+0x885): undefined reference to `ERR_error_string_n'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ossl_connect_step2':
openssl.c:(.text+0x8c6): undefined reference to `ERR_clear_error'
openssl.c:(.text+0x8cf): undefined reference to `SSL_connect'
openssl.c:(.text+0x8e3): undefined reference to `SSL_get_error'
openssl.c:(.text+0x91c): undefined reference to `ERR_get_error'
openssl.c:(.text+0x9ce): undefined reference to `SSL_get_current_cipher'
openssl.c:(.text+0x9d6): undefined reference to `SSL_CIPHER_get_name'
openssl.c:(.text+0x9ee): undefined reference to `SSL_version'
openssl.c:(.text+0xa55): undefined reference to `SSL_get_verify_result'
openssl.c:(.text+0xa62): undefined reference to `X509_verify_cert_error_string'
./lib/libcurl.a(libcurl_la-openssl.o): In function `x509_name_oneline':
openssl.c:(.text+0xb37): undefined reference to `BIO_s_mem'
openssl.c:(.text+0xb3f): undefined reference to `BIO_new'
openssl.c:(.text+0xb5e): undefined reference to `X509_NAME_print_ex'
openssl.c:(.text+0xb75): undefined reference to `BIO_ctrl'
openssl.c:(.text+0xba4): undefined reference to `BIO_free'
./lib/libcurl.a(libcurl_la-openssl.o): In function `pubkey_show':
openssl.c:(.text+0xc16): undefined reference to `BN_print'
openssl.c:(.text+0xc2a): undefined reference to `BIO_ctrl'
openssl.c:(.text+0xc51): undefined reference to `BIO_ctrl'
./lib/libcurl.a(libcurl_la-openssl.o): In function `verifyhost':
openssl.c:(.text+0xd02): undefined reference to `X509_get_ext_d2i'
openssl.c:(.text+0xd16): undefined reference to `sk_num'
openssl.c:(.text+0xd36): undefined reference to `sk_value'
openssl.c:(.text+0xd60): undefined reference to `GENERAL_NAMES_free'
openssl.c:(.text+0xe39): undefined reference to `GENERAL_NAMES_free'
openssl.c:(.text+0xe52): undefined reference to `X509_get_subject_name'
openssl.c:(.text+0xe7d): undefined reference to `X509_NAME_get_index_by_NID'
openssl.c:(.text+0xe8f): undefined reference to `X509_NAME_get_entry'
openssl.c:(.text+0xe97): undefined reference to `X509_NAME_ENTRY_get_data'
openssl.c:(.text+0xea7): undefined reference to `ASN1_STRING_type'
openssl.c:(.text+0xebd): undefined reference to `ASN1_STRING_to_UTF8'
openssl.c:(.text+0xf5f): undefined reference to `CRYPTO_free'
openssl.c:(.text+0xf71): undefined reference to `ASN1_STRING_data'
openssl.c:(.text+0xf7f): undefined reference to `ASN1_STRING_length'
openssl.c:(.text+0x1004): undefined reference to `GENERAL_NAMES_free'
openssl.c:(.text+0x1044): undefined reference to `ASN1_STRING_length'
openssl.c:(.text+0x1064): undefined reference to `CRYPTO_malloc'
openssl.c:(.text+0x107d): undefined reference to `ASN1_STRING_data'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ossl_connect_step3':
openssl.c:(.text+0x110e): undefined reference to `SSL_get1_session'
openssl.c:(.text+0x1195): undefined reference to `BIO_s_mem'
openssl.c:(.text+0x119d): undefined reference to `BIO_new'
openssl.c:(.text+0x11c2): undefined reference to `SSL_get_peer_certificate'
openssl.c:(.text+0x1209): undefined reference to `X509_get_subject_name'
openssl.c:(.text+0x1256): undefined reference to `ASN1_TIME_print'
openssl.c:(.text+0x126a): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x129b): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x12b9): undefined reference to `ASN1_TIME_print'
openssl.c:(.text+0x12cd): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x12fe): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1308): undefined reference to `BIO_free'
openssl.c:(.text+0x1341): undefined reference to `X509_get_issuer_name'
openssl.c:(.text+0x13ae): undefined reference to `i2d_X509_PUBKEY'
openssl.c:(.text+0x13cb): undefined reference to `CRYPTO_malloc'
openssl.c:(.text+0x13f4): undefined reference to `i2d_X509_PUBKEY'
openssl.c:(.text+0x1409): undefined reference to `CRYPTO_free'
openssl.c:(.text+0x147a): undefined reference to `SSL_get_peer_cert_chain'
openssl.c:(.text+0x1490): undefined reference to `sk_num'
openssl.c:(.text+0x14ad): undefined reference to `BIO_s_mem'
openssl.c:(.text+0x14b5): undefined reference to `BIO_new'
openssl.c:(.text+0x14f5): undefined reference to `sk_value'
openssl.c:(.text+0x1502): undefined reference to `X509_get_subject_name'
openssl.c:(.text+0x1514): undefined reference to `X509_NAME_print_ex'
openssl.c:(.text+0x1528): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1559): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1563): undefined reference to `X509_get_issuer_name'
openssl.c:(.text+0x1575): undefined reference to `X509_NAME_print_ex'
openssl.c:(.text+0x1589): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x15ba): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x15ca): undefined reference to `ASN1_INTEGER_get'
openssl.c:(.text+0x15de): undefined reference to `BIO_printf'
openssl.c:(.text+0x15f2): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1623): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x162d): undefined reference to `X509_get_serialNumber'
openssl.c:(.text+0x1661): undefined reference to `BIO_printf'
openssl.c:(.text+0x1681): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x16b2): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x16c9): undefined reference to `i2a_ASN1_OBJECT'
openssl.c:(.text+0x16dd): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x170e): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1725): undefined reference to `ASN1_TIME_print'
openssl.c:(.text+0x1739): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x176a): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1782): undefined reference to `ASN1_TIME_print'
openssl.c:(.text+0x1796): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x17c7): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x17d9): undefined reference to `i2a_ASN1_OBJECT'
openssl.c:(.text+0x17ed): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x181e): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1828): undefined reference to `X509_get_pubkey'
openssl.c:(.text+0x185a): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x186b): undefined reference to `sk_num'
openssl.c:(.text+0x1885): undefined reference to `sk_num'
openssl.c:(.text+0x189d): undefined reference to `sk_value'
openssl.c:(.text+0x18a5): undefined reference to `BIO_s_mem'
openssl.c:(.text+0x18ad): undefined reference to `BIO_new'
openssl.c:(.text+0x18c1): undefined reference to `X509_EXTENSION_get_object'
openssl.c:(.text+0x18d2): undefined reference to `i2t_ASN1_OBJECT'
openssl.c:(.text+0x18e1): undefined reference to `X509V3_EXT_print'
openssl.c:(.text+0x1905): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1997): undefined reference to `BIO_free'
openssl.c:(.text+0x19c7): undefined reference to `X509_free'
openssl.c:(.text+0x19ee): undefined reference to `X509_free'
openssl.c:(.text+0x1a4b): undefined reference to `X509_EXTENSION_get_data'
openssl.c:(.text+0x1a56): undefined reference to `ASN1_STRING_print'
openssl.c:(.text+0x1a87): undefined reference to `BIO_printf'
openssl.c:(.text+0x1aaf): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1ae0): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1aed): undefined reference to `PEM_write_bio_X509'
openssl.c:(.text+0x1b01): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1b32): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1b4d): undefined reference to `BIO_free'
openssl.c:(.text+0x1b5a): undefined reference to `SSL_SESSION_free'
openssl.c:(.text+0x1bb2): undefined reference to `PEM_read_X509'
openssl.c:(.text+0x1bd7): undefined reference to `X509_check_issued'
openssl.c:(.text+0x1bf8): undefined reference to `X509_free'
openssl.c:(.text+0x1c05): undefined reference to `X509_free'
openssl.c:(.text+0x1d16): undefined reference to `X509_free'
openssl.c:(.text+0x1e4d): undefined reference to `BIO_puts'
openssl.c:(.text+0x1e5f): undefined reference to `BN_num_bits'
openssl.c:(.text+0x1e72): undefined reference to `BIO_printf'
openssl.c:(.text+0x1e86): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x1eb7): undefined reference to `BIO_ctrl'
openssl.c:(.text+0x205d): undefined reference to `X509_free'
openssl.c:(.text+0x206b): undefined reference to `SSL_get_verify_result'
openssl.c:(.text+0x20a3): undefined reference to `X509_verify_cert_error_string'
openssl.c:(.text+0x2109): undefined reference to `CRYPTO_free'
openssl.c:(.text+0x211f): undefined reference to `X509_free'
openssl.c:(.text+0x21a1): undefined reference to `X509_free'
openssl.c:(.text+0x21a8): undefined reference to `X509_free'
openssl.c:(.text+0x21d1): undefined reference to `X509_free'
openssl.c:(.text+0x2229): undefined reference to `X509_verify_cert_error_string'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ossl_connect_common':
openssl.c:(.text+0x2450): undefined reference to `SSLv23_client_method'
openssl.c:(.text+0x2461): undefined reference to `SSL_CTX_free'
openssl.c:(.text+0x2469): undefined reference to `SSL_CTX_new'
openssl.c:(.text+0x24f2): undefined reference to `SSL_CTX_ctrl'
openssl.c:(.text+0x2576): undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
openssl.c:(.text+0x2587): undefined reference to `SSL_CTX_set_default_passwd_cb'
openssl.c:(.text+0x2677): undefined reference to `SSLv2_client_method'
openssl.c:(.text+0x2690): undefined reference to `SSL_CTX_set_msg_callback'
openssl.c:(.text+0x26a3): undefined reference to `SSL_CTX_ctrl'
openssl.c:(.text+0x26ad): undefined reference to `SSLv3_client_method'
openssl.c:(.text+0x2760): undefined reference to `d2i_PKCS12_fp'
openssl.c:(.text+0x277e): undefined reference to `PKCS12_PBE_add'
openssl.c:(.text+0x27ac): undefined reference to `PKCS12_parse'
openssl.c:(.text+0x27b9): undefined reference to `ERR_get_error'
openssl.c:(.text+0x27c3): undefined reference to `ERR_error_string'
openssl.c:(.text+0x27e6): undefined reference to `PKCS12_free'
openssl.c:(.text+0x2812): undefined reference to `SSL_CTX_set_cipher_list'
openssl.c:(.text+0x284c): undefined reference to `SSL_CTX_use_certificate_file'
openssl.c:(.text+0x2856): undefined reference to `ERR_get_error'
openssl.c:(.text+0x2865): undefined reference to `ERR_error_string'
openssl.c:(.text+0x2885): undefined reference to `ERR_peek_error'
openssl.c:(.text+0x2894): undefined reference to `ERR_error_string'
openssl.c:(.text+0x2930): undefined reference to `SSL_CTX_load_verify_locations'
openssl.c:(.text+0x2992): undefined reference to `SSL_CTX_use_certificate_chain_file'
openssl.c:(.text+0x29a0): undefined reference to `ERR_get_error'
openssl.c:(.text+0x29af): undefined reference to `ERR_error_string'
openssl.c:(.text+0x29f4): undefined reference to `SSL_new'
openssl.c:(.text+0x2a0c): undefined reference to `SSL_get_certificate'
openssl.c:(.text+0x2a21): undefined reference to `X509_get_pubkey'
openssl.c:(.text+0x2a2e): undefined reference to `SSL_get_privatekey'
openssl.c:(.text+0x2a39): undefined reference to `EVP_PKEY_copy_parameters'
openssl.c:(.text+0x2a41): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x2a4b): undefined reference to `SSL_free'
openssl.c:(.text+0x2a55): undefined reference to `SSL_CTX_check_private_key'
openssl.c:(.text+0x2aa7): undefined reference to `SSL_CTX_use_PrivateKey_file'
openssl.c:(.text+0x2b31): undefined reference to `ENGINE_ctrl'
openssl.c:(.text+0x2bbd): undefined reference to `X509_LOOKUP_file'
openssl.c:(.text+0x2bc9): undefined reference to `SSL_CTX_get_cert_store'
openssl.c:(.text+0x2bd4): undefined reference to `X509_STORE_add_lookup'
openssl.c:(.text+0x2bf2): undefined reference to `X509_load_crl_file'
openssl.c:(.text+0x2c5f): undefined reference to `ENGINE_ctrl_cmd'
openssl.c:(.text+0x2c7e): undefined reference to `SSL_CTX_use_certificate'
openssl.c:(.text+0x2ca8): undefined reference to `X509_free'
openssl.c:(.text+0x2cd9): undefined reference to `X509_free'
openssl.c:(.text+0x2d00): undefined reference to `ERR_get_error'
openssl.c:(.text+0x2d0f): undefined reference to `ERR_error_string'
openssl.c:(.text+0x2d63): undefined reference to `SSL_CTX_get_cert_store'
openssl.c:(.text+0x2d70): undefined reference to `X509_STORE_set_flags'
openssl.c:(.text+0x2db2): undefined reference to `SSL_CTX_set_verify'
openssl.c:(.text+0x2dee): undefined reference to `SSL_free'
openssl.c:(.text+0x2df7): undefined reference to `SSL_new'
openssl.c:(.text+0x2e0c): undefined reference to `SSL_set_connect_state'
openssl.c:(.text+0x2e3f): undefined reference to `SSL_set_session'
openssl.c:(.text+0x2e4c): undefined reference to `ERR_get_error'
openssl.c:(.text+0x2e5b): undefined reference to `ERR_error_string'
openssl.c:(.text+0x2e95): undefined reference to `UI_create_method'
openssl.c:(.text+0x2ea6): undefined reference to `UI_OpenSSL'
openssl.c:(.text+0x2eae): undefined reference to `UI_method_get_opener'
openssl.c:(.text+0x2eb9): undefined reference to `UI_method_set_opener'
openssl.c:(.text+0x2ebe): undefined reference to `UI_OpenSSL'
openssl.c:(.text+0x2ec6): undefined reference to `UI_method_get_closer'
openssl.c:(.text+0x2ed1): undefined reference to `UI_method_set_closer'
openssl.c:(.text+0x2ee0): undefined reference to `UI_method_set_reader'
openssl.c:(.text+0x2eef): undefined reference to `UI_method_set_writer'
openssl.c:(.text+0x2f0f): undefined reference to `ENGINE_load_private_key'
openssl.c:(.text+0x2f1c): undefined reference to `UI_destroy_method'
openssl.c:(.text+0x2f37): undefined reference to `SSL_CTX_use_PrivateKey'
openssl.c:(.text+0x2f62): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x2f71): undefined reference to `PKCS12_free'
openssl.c:(.text+0x2f83): undefined reference to `SSL_CTX_use_certificate'
openssl.c:(.text+0x2f8d): undefined reference to `ERR_get_error'
openssl.c:(.text+0x2f97): undefined reference to `ERR_error_string'
openssl.c:(.text+0x2fbf): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x2fcc): undefined reference to `X509_free'
openssl.c:(.text+0x2fd3): undefined reference to `X509_free'
openssl.c:(.text+0x2fe0): undefined reference to `sk_pop_free'
openssl.c:(.text+0x3019): undefined reference to `SSL_CTX_use_PrivateKey'
openssl.c:(.text+0x3049): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x30af): undefined reference to `SSL_CTX_check_private_key'
openssl.c:(.text+0x30cd): undefined reference to `sk_num'
openssl.c:(.text+0x30ea): undefined reference to `sk_num'
openssl.c:(.text+0x3101): undefined reference to `sk_pop'
openssl.c:(.text+0x3118): undefined reference to `SSL_CTX_ctrl'
openssl.c:(.text+0x312e): undefined reference to `SSL_CTX_add_client_CA'
openssl.c:(.text+0x31c9): undefined reference to `SSL_set_fd'
openssl.c:(.text+0x31fb): undefined reference to `ERR_get_error'
openssl.c:(.text+0x320a): undefined reference to `ERR_error_string'
openssl.c:(.text+0x3267): undefined reference to `EVP_PKEY_free'
openssl.c:(.text+0x3274): undefined reference to `X509_free'
openssl.c:(.text+0x327b): undefined reference to `X509_free'
openssl.c:(.text+0x3288): undefined reference to `sk_pop_free'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ossl_send':
openssl.c:(.text+0x331b): undefined reference to `ERR_clear_error'
openssl.c:(.text+0x333a): undefined reference to `SSL_write'
openssl.c:(.text+0x338a): undefined reference to `SSL_get_error'
openssl.c:(.text+0x33ea): undefined reference to `ERR_get_error'
openssl.c:(.text+0x33f5): undefined reference to `ERR_error_string'
./lib/libcurl.a(libcurl_la-openssl.o): In function `ossl_recv':
openssl.c:(.text+0x3466): undefined reference to `ERR_clear_error'
openssl.c:(.text+0x348b): undefined reference to `SSL_read'
openssl.c:(.text+0x34db): undefined reference to `SSL_get_error'
openssl.c:(.text+0x3501): undefined reference to `ERR_get_error'
openssl.c:(.text+0x3520): undefined reference to `ERR_error_string'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_close_all':
openssl.c:(.text+0x3571): undefined reference to `ENGINE_finish'
openssl.c:(.text+0x357d): undefined reference to `ENGINE_free'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_close':
openssl.c:(.text+0x35aa): undefined reference to `SSL_shutdown'
openssl.c:(.text+0x35b3): undefined reference to `SSL_set_connect_state'
openssl.c:(.text+0x35bc): undefined reference to `SSL_free'
openssl.c:(.text+0x35d2): undefined reference to `SSL_CTX_free'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_shutdown':
openssl.c:(.text+0x365c): undefined reference to `ERR_clear_error'
openssl.c:(.text+0x3675): undefined reference to `SSL_read'
openssl.c:(.text+0x3685): undefined reference to `SSL_get_error'
openssl.c:(.text+0x36a7): undefined reference to `ERR_get_error'
openssl.c:(.text+0x36bd): undefined reference to `ERR_error_string'
openssl.c:(.text+0x36ea): undefined reference to `SSL_free'
openssl.c:(.text+0x3755): undefined reference to `SSL_get_shutdown'
openssl.c:(.text+0x380b): undefined reference to `SSL_shutdown'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_engines_list':
openssl.c:(.text+0x3835): undefined reference to `ENGINE_get_first'
openssl.c:(.text+0x384f): undefined reference to `ENGINE_get_next'
openssl.c:(.text+0x385f): undefined reference to `ENGINE_get_id'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_set_engine_default':
openssl.c:(.text+0x38a8): undefined reference to `ENGINE_set_default'
openssl.c:(.text+0x38b8): undefined reference to `ENGINE_get_id'
openssl.c:(.text+0x38df): undefined reference to `ENGINE_get_id'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_set_engine':
openssl.c:(.text+0x3912): undefined reference to `ENGINE_get_first'
openssl.c:(.text+0x3927): undefined reference to `ENGINE_get_next'
openssl.c:(.text+0x393b): undefined reference to `ENGINE_get_id'
openssl.c:(.text+0x395c): undefined reference to `ENGINE_finish'
openssl.c:(.text+0x3969): undefined reference to `ENGINE_free'
openssl.c:(.text+0x397d): undefined reference to `ENGINE_init'
openssl.c:(.text+0x3989): undefined reference to `ENGINE_free'
openssl.c:(.text+0x398e): undefined reference to `ERR_get_error'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_check_cxn':
openssl.c:(.text+0x3a16): undefined reference to `SSL_peek'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_cleanup':
openssl.c:(.text+0x3a45): undefined reference to `EVP_cleanup'
openssl.c:(.text+0x3a4a): undefined reference to `ENGINE_cleanup'
openssl.c:(.text+0x3a4f): undefined reference to `CRYPTO_cleanup_all_ex_data'
openssl.c:(.text+0x3a54): undefined reference to `ERR_free_strings'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_init':
openssl.c:(.text+0x3a75): undefined reference to `ENGINE_load_builtin_engines'
openssl.c:(.text+0x3a83): undefined reference to `CONF_modules_load_file'
openssl.c:(.text+0x3a88): undefined reference to `SSL_load_error_strings'
openssl.c:(.text+0x3a8d): undefined reference to `SSL_library_init'
openssl.c:(.text+0x3a98): undefined reference to `OPENSSL_add_all_algorithms_noconf'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_session_free':
openssl.c:(.text+0xb01): undefined reference to `SSL_SESSION_free'
./lib/libcurl.a(libcurl_la-openssl.o): In function `Curl_ossl_cleanup':
openssl.c:(.text+0x3a5f): undefined reference to `ERR_remove_state'
./lib/libcurl.a(libcurl_la-md5.o): In function `Curl_md5it':
md5.c:(.text+0xfd): undefined reference to `MD5_Init'
md5.c:(.text+0x11a): undefined reference to `MD5_Update'
md5.c:(.text+0x125): undefined reference to `MD5_Final'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x0): undefined reference to `MD5_Init'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x8): undefined reference to `MD5_Update'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x10): undefined reference to `MD5_Final'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x40): undefined reference to `MD5_Init'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x48): undefined reference to `MD5_Update'
./lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x50): undefined reference to `MD5_Final'
./lib/libcurl.a(libcurl_la-curl_ntlm_core.o): In function `Curl_ntlm_core_mk_nt_hash':
curl_ntlm_core.c:(.text+0x3a0): undefined reference to `MD4_Init'
curl_ntlm_core.c:(.text+0x3ae): undefined reference to `MD4_Update'
curl_ntlm_core.c:(.text+0x3b9): undefined reference to `MD4_Final'
./lib/libcurl.a(libcurl_la-curl_ntlm_core.o): In function `setup_des_key':
curl_ntlm_core.c:(.text+0x494): undefined reference to `DES_set_odd_parity'
curl_ntlm_core.c:(.text+0x49f): undefined reference to `DES_set_key'
./lib/libcurl.a(libcurl_la-curl_ntlm_core.o): In function `Curl_ntlm_core_mk_lm_hash':
curl_ntlm_core.c:(.text+0x536): undefined reference to `DES_ecb_encrypt'
curl_ntlm_core.c:(.text+0x55b): undefined reference to `DES_ecb_encrypt'
./lib/libcurl.a(libcurl_la-curl_ntlm_core.o): In function `Curl_ntlm_core_lm_resp':
curl_ntlm_core.c:(.text+0x5fb): undefined reference to `DES_ecb_encrypt'
curl_ntlm_core.c:(.text+0x620): undefined reference to `DES_ecb_encrypt'
curl_ntlm_core.c:(.text+0x63f): undefined reference to `DES_ecb_encrypt'
collect2: ld returned 1 exit status
make: *** [bin/smapvss] Error 1

在Linux用libcurl.a在链接的时候出错的更多相关文章

  1. 【转】Linux下软、硬链接的创建和删除

    原文:http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/10/05/2199534.html 在Linux系统中,内核为每一个新创建的文件分 ...

  2. Windows和Linux创建软链接和硬链接

    1.Wondows创建软链接和硬链接 mklink [/d] [/h] link target /d--创建目录软链接:默认为文件软链接:创建目录链接时必须使用该选项不然创出的软链接无效 /h--创建 ...

  3. linux下软、硬链接的创建和删除

    linux下软.硬链接的创建和删除 在Linux系统中,内核为每一个新创建的文件分配一个Inode(索引结点),每个文件都有一个惟一的inode号.文件属性保存在索引结点里,在访问文件时,索引结点被复 ...

  4. Linux 运维之硬链接与软链接详解

    了解这个的时候不如先知道下文件吧. 我们知道文件都有文件名与数据,但是呢这个在 Linux 上被分成两个部分:用户数据 (user data) 与元数据 (metadata). 用户数据,即文件数据块 ...

  5. [转帖]Linux 下软链接和硬链接的区别

    Linux 下软链接和硬链接的区别 http://os.51cto.com/art/201911/605267.htm 软连接 文件是小的 只是一个链接 删除和其他处理不影响 原始文件的计数 删除源文 ...

  6. [转帖]详解Linux系统inode原理--硬链接、软链接、innodb大小和划分等

    详解Linux系统inode原理--硬链接.软链接.innodb大小和划分等 原创 波波说运维 2019-07-17 00:03:00 https://www.toutiao.com/i6713116 ...

  7. Linux gcc链接动态库出错:LIBRARY_PATH和LD_LIBRARY_PATH的区别

    昨天在自己的CentOs7.1上写makefile的时候,发现在一个C程序在编译并链接一个已生成好的lib动态库的时候出错.链接命令大概是这样的: [root@typecodes tcpmsg]# g ...

  8. linux c libcurl的简单使用(转)

    curl是Linux下一个非常著名的下载库,通过这个库,可以很简单的实现文件的下载等操作.看一个简单的例子: #include <curl/curl.h> #include <std ...

  9. windows下和linux下libcurl安装

    下载源代码,在winbuild里面有个说明文件: Building with Visual C++, prerequisites==================================== ...

随机推荐

  1. App开发流程之状态栏和导航栏

    记录状态栏和导航栏的设置和控制,统一在基类视图控制器中完成. 状态栏. 状态栏高度为20,iOS7以后背景完全透明. 样式枚举如下: typedef NS_ENUM(NSInteger, UIStat ...

  2. 【转载】菜鸟Ubuntu下安装Android Studio

    原文:http://forum.android-studio.org/forum.php?mod=viewthread&tid=236&extra=page%3D1%26filter% ...

  3. 【原】log4cplus使用说明

    网上关于开源日志工具log4cplus的说明有很多,但大多略显复杂,本文主要从实用的角度,介绍一种最简单而且又实用的方法.本文的方法已经足够满足实际工程中的使用需求,而且不需要很复杂的流程,可以实现. ...

  4. Web应用程序系统的多用户权限控制设计及实现-首页模块【5】

    首页模块就是展示不同权限的最终结果了,在阅读这章之前若有些不明白,可看看后续的单独的权限模块,用户模块,目录模块后从整体上再看首页模块. 阅读该模块需要一定或者是比较熟练的js知识,EasyUI Ta ...

  5. Android 网络编程基础之简单聊天程序

    前一篇讲了Android的网络编程基础,今天写了一个简单的聊天程序分享一下 首先是服务端代码: package com.jiao.socketdemo; import java.io.Buffered ...

  6. iOS之 随笔-静态库创建Xcode7

    不多说直接上图 然后你就可以找到你的.a文件了还有你的头文件 在终端可以检查你所编译的静态库都支持什么架构(armv7,armv7s ,arm64)用这个命令 lipo -info 编译时候要看你Xc ...

  7. 关于第三方IOS的checkBox框架的使用

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  8. javascript中的 cookie对象

    Cookie 对象 是一种以文件(Cookie文件)的形式保存在客户端硬盘的Cookies文件夹中的数据信息(Cookie数据).Cookie文件夹中的用户数据信息(Cookie数据).Cookie文 ...

  9. 使用batch insert解决MySQL的insert吞吐量问题

    最近使用了一个非常简单易用的方法解决了业务上的一个insert吞吐量的问题,在此总结一下. 首先我们明确一下,insert吞吐量其实并不是指的IPS(insert per second),而是指的RP ...

  10. Effective Java 30 Use Enums instead of int constants

    Enumerated type is a type whose legal values consist of a fixed set of constants, such as the season ...