compile error in libpq program - Mailing list pgsql-general

From zab08
Subject compile error in libpq program
Date
Msg-id 775c5b95.f2df.12bd1522420.Coremail.zab08@126.com
Whole thread Raw
Responses Re: compile error in libpq program
List pgsql-general
I use this command to compile the libpq.c.
 cc -I /opt/PostgreSQL/8.4/include -o libpq libpq.c -L /opt/PostgreSQL/8.4/lib -lpq

but I get these error:
/usr/bin/ld: warning: libssl.so.4, needed by /opt/PostgreSQL/8.4/lib/libpq.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcrypto.so.4, needed by /opt/PostgreSQL/8.4/lib/libpq.so, not found (try using -rpath or -rpath-link)
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `TLSv1_method'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_set_ex_data'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_connect'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `X509_STORE_load_locations'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `BIO_free'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `BIO_ctrl'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `CRYPTO_set_locking_callback'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `X509_NAME_oneline'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_CTX_set_verify'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `PEM_read_bio_PrivateKey'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `CRYPTO_num_locks'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ENGINE_finish'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_CTX_load_verify_locations'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ERR_get_error'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ERR_reason_error_string'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_library_init'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `CRYPTO_set_id_callback'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_get_ex_data'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_new'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_write'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `OPENSSL_config'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_CTX_get_cert_store'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `X509_check_private_key'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `X509_free'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_shutdown'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `BIO_new_file'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ENGINE_free'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `SSL_get_error'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ENGINE_by_id'
/opt/PostgreSQL/8.4/lib/libpq.so: undefined reference to `ENGINE_init'
collect2: ld 返回 1

I use postgresql 8.4  and use ssl to connect the server.





pgsql-general by date:

Previous
From: David Kerr
Date:
Subject: Re: Generate a dynamic sequence within a query
Next
From: "Daniel Verite"
Date:
Subject: Re: Generate a dynamic sequence within a query