raj pansuria 写道:
> but my libssl.so is at /usr/lib and my lhmail.so is at /usr/lib/qt/lib
> and my application is /home/lhmail/pop/
> and my application need lhmail.so and lhmail.so depends on libssl.so
> how i link both these lib wyhen i compilinh my application
> i m new in linux stuff
> plz tell me step by step
> regards,
> Amit
>
> On 6/9/07, *Allen Cbhen* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     raj pansuria 写道:
>     > helo i m using fedora core 6
>     >
>     > i got the following error
>     >
>     > helo my dynamic lib file is stored
>     > at /usr/src/lib/qt-3.3/lib/lhmail.so and
>     > it required support for libssl.so and libssl.so is in /usr/lib
>     > but when i run my application
>     > i got the following strange errors
>     >
>     > ../../liblhmail.so: undefined reference to `BIO_ctrl'
>     > ../../liblhmail.so: undefined reference to `d2i_DHparams'
>     > ../../liblhmail.so: undefined reference to `X509_dup'
>     > ../../liblhmail.so: undefined reference to `ASN1_HEADER_free'
>     > ../../liblhmail.so: undefined reference to `X509_LOOKUP_file'
>     > ../../liblhmail.so: undefined reference to `ERR_print_errors'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_set1_RSA'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_set1_DSA'
>     > ../../liblhmail.so: undefined reference to `CRYPTO_mem_ctrl'
>     > ../../liblhmail.so: undefined reference to `RSA_free'
>     > ../../liblhmail.so: undefined reference to `DH_free'
>     > ../../liblhmail.so: undefined reference to `BIO_free'
>     > ../../liblhmail.so: undefined reference to `PKCS7_free'
>     > ../../liblhmail.so: undefined reference to `X509_LOOKUP_hash_dir'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_free'
>     > ../../liblhmail.so: undefined reference to `BUF_MEM_free'
>     > ../../liblhmail.so: undefined reference to `i2d_DHparams'
>     > ../../liblhmail.so: undefined reference to
>     `PEM_read_bio_PrivateKey'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_set1_DH'
>     > ../../liblhmail.so: undefined reference to `ERR_load_crypto_strings'
>     > ../../liblhmail.so: undefined reference to `X509_LOOKUP_ctrl'
>     > ../../liblhmail.so: undefined reference to `PEM_write_bio_PKCS7'
>     > ../../liblhmail.so: undefined reference to `ASN1_dup'
>     > ../../liblhmail.so: undefined reference to `i2d_DSAparams'
>     > ../../liblhmail.so: undefined reference to `BIO_printf'
>     > ../../liblhmail.so: undefined reference to `RSAPrivateKey_dup'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_new'
>     > ../../liblhmail.so: undefined reference to `SMIME_read_PKCS7'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_get1_RSA'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_get1_DH'
>     > ../../liblhmail.so: undefined reference to `BIO_free_all'
>     > ../../liblhmail.so: undefined reference to `BIO_s_file'
>     > ../../liblhmail.so: undefined reference to `BIO_s_mem'
>     > ../../liblhmail.so: undefined reference to `BIO_new_fp'
>     > ../../liblhmail.so: undefined reference to
>     > `OPENSSL_add_all_algorithms_noconf'
>     > ../../liblhmail.so: undefined reference to `PKCS7_verify'
>     > ../../liblhmail.so: undefined reference to `d2i_DSAparams'
>     > ../../liblhmail.so: undefined reference to `CRYPTO_mem_leaks'
>     > ../../liblhmail.so: undefined reference to `BIO_new'
>     > ../../liblhmail.so: undefined reference to `X509_STORE_free'
>     > ../../liblhmail.so: undefined reference to `X509_STORE_new'
>     > ../../liblhmail.so: undefined reference to `X509_STORE_add_lookup'
>     > ../../liblhmail.so: undefined reference to `PEM_read_bio_X509_AUX'
>     > ../../liblhmail.so: undefined reference to `ERR_clear_error'
>     > ../../liblhmail.so: undefined reference to `BIO_new_mem_buf'
>     > ../../liblhmail.so: undefined reference to `DSA_free'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_type'
>     > ../../liblhmail.so: undefined reference to `PKCS7_sign'
>     > ../../liblhmail.so: undefined reference to `EVP_PKEY_get1_DSA'
>     > ../../liblhmail.so: undefined reference to
>     `ENGINE_load_builtin_engines'
>     > collect2: ld returned 1 exit status
>     > make: *** [pop3] Error 1
>     >
>     > what to do to solve this error
>     > amit
>     Add |/usr/local/ssl/lib to |LD_LIBRARY_PATH or /etc/ld.so.conf|.|
>     ______________________________________________________________________
>     OpenSSL Project http://www.openssl.org
>     User Support Mailing List openssl-users@openssl.org
>     <mailto:openssl-users@openssl.org>
>     Automated List Manager [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>
>

Do you compile your application or run?
If you do compile, please set link path to gcc with -L and specify
library with -l.
For example, I want you link /usr/local/ssl/lib/libssl.so, try this
$gcc -o example example.c -L/usr/local/ssl/lib -lssl

Regards
Allen Chen

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to