在Linux用libcurl.a在链接的时候出错
其实出错是因为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在链接的时候出错的更多相关文章
- 【转】Linux下软、硬链接的创建和删除
原文:http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/10/05/2199534.html 在Linux系统中,内核为每一个新创建的文件分 ...
- Windows和Linux创建软链接和硬链接
1.Wondows创建软链接和硬链接 mklink [/d] [/h] link target /d--创建目录软链接:默认为文件软链接:创建目录链接时必须使用该选项不然创出的软链接无效 /h--创建 ...
- linux下软、硬链接的创建和删除
linux下软.硬链接的创建和删除 在Linux系统中,内核为每一个新创建的文件分配一个Inode(索引结点),每个文件都有一个惟一的inode号.文件属性保存在索引结点里,在访问文件时,索引结点被复 ...
- Linux 运维之硬链接与软链接详解
了解这个的时候不如先知道下文件吧. 我们知道文件都有文件名与数据,但是呢这个在 Linux 上被分成两个部分:用户数据 (user data) 与元数据 (metadata). 用户数据,即文件数据块 ...
- [转帖]Linux 下软链接和硬链接的区别
Linux 下软链接和硬链接的区别 http://os.51cto.com/art/201911/605267.htm 软连接 文件是小的 只是一个链接 删除和其他处理不影响 原始文件的计数 删除源文 ...
- [转帖]详解Linux系统inode原理--硬链接、软链接、innodb大小和划分等
详解Linux系统inode原理--硬链接.软链接.innodb大小和划分等 原创 波波说运维 2019-07-17 00:03:00 https://www.toutiao.com/i6713116 ...
- Linux gcc链接动态库出错:LIBRARY_PATH和LD_LIBRARY_PATH的区别
昨天在自己的CentOs7.1上写makefile的时候,发现在一个C程序在编译并链接一个已生成好的lib动态库的时候出错.链接命令大概是这样的: [root@typecodes tcpmsg]# g ...
- linux c libcurl的简单使用(转)
curl是Linux下一个非常著名的下载库,通过这个库,可以很简单的实现文件的下载等操作.看一个简单的例子: #include <curl/curl.h> #include <std ...
- windows下和linux下libcurl安装
下载源代码,在winbuild里面有个说明文件: Building with Visual C++, prerequisites==================================== ...
随机推荐
- JAVA基础学习day25--Socket基础二-多线程
一.上传图片 1.1.示例 /* 上传图片 */ import java.net.*; import java.io.*; import java.util.*; import java.text.* ...
- CocoaPods的安装(图文并茂)OS X 10.11 系统
这里是前言,可以跳过前言部分直接跳到后面"这里正式安装"开始看步骤: 系统:OS X EI Capitan 版本:10.11.2 开发工具:XCode:7.2 先给一个挺不错的关于 ...
- Objective-C之@类别小实例
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- android媒体文件扫描
项目中可能有这样的需求:下载或导入.导出的图片.音乐等媒体文件,需要马上能在图库或本地视屏播放器中显示出来,或者要能在媒体数据库中查询到媒体文件的相关信息,这时我们就得主动通知系统扫描新的媒体文件了. ...
- 5+ App开发入门指南
HTML5 Plus应用概述 HTML5 Plus移动App,简称5+App,是一种基于HTML.JS.CSS编写的运行于手机端的App,这种App可以通过扩展的JS API任意调用手机的原生能力,实 ...
- 设置IE兼容模式的几种方法
一.指定文件兼容性模式要为你的网页指定文件模式,需要在你的网页中使用meta元素放入x-ua-compatible http-equiv 标头.1. 强制ie8使用ie8模式来解析,而且那个兼容性视图 ...
- 搭建Struts2不同版本jar包不同
struts2的版本比较多,所以在开发的时候特别要注意版本不同所需引入的包是不一样的.否则,会出现各种问题.而且很难找到问题所在. 以下是我遇到的问题总结: 一.当我运用struts2.3.4.1时, ...
- 读书笔记——网络编程与开发技术(3)基于TCP/IP协议的网络编程相关知识
TCP/IP协议:数据链路层,网络层,传输层,应用层. IP地址分为5类:A类.B类.C类.D类.E类. (A类.B类.C类是基本类,D类多用于多播传送,E类为保留类.) "*"表 ...
- 计算机信息统计.vbs
temp=0 set wshshell=wscript.createobject("wscript.shell") Set WshNetwork = WScript.Createo ...
- ProjectManager Alpha8 - 项目管理器,管理起开发中的项目很方便
话不多说= = 放几张图了: 文件下载: 32位下载:Package_ProjectManager-1.13.12.exe 64位下载:Package_ProjectManager_x64-1.13. ...