On Sat, Jul 16, 2011 at 2:39 AM,  <brandon...@aol.com> wrote:
> Hi.
>
> I am writing some C++ on Linux with g++. When I try to link statically to
> libcrypto, by using the libcrypto.a library, it complains that
> RSA_generate_key and DH_generate_parameters are undefined references.
> Actually, I believe it said that openldap.so was complaining that they were
> undefined, so I guess libcrypto.a is calling openldap.
openldap probably relies upon OpenSSL.

> I am already including "-lssl" in my list of libraries. If this had worked,
> I would have next tried to link in libssl statically.
The OpenSSL crypto stuff is brought in by libcrypto.

> Any idea what library I can link in to define the above two references?
Link to OpenSSL first, and then OpenLdap (order matters):

gcc ... -lcrypto -lopenldap

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to