Brandon,

Am 16.07.2011 um 10:59 schrieb brandon...@aol.com:
> Actually, I believe it said that openldap.so was complaining that they were
It  would certainly help if you actually knew what it was saying,
not just believed it!   And  wasn't  it  rather  libldap.so,  not
openldap.so.  Of  course,  libldap.so is usually provided by some
openldap package.

> I am already linking in -lldap.  Will -lopenldap work better?
He certainly meant -lldap (the library is called  libldap.so,  so
the  linker  flag  is  called  -lldap). If your library really is
called openldap.so (which I very much doubt), then  you  can  not
link  it  with the -l option, you have to add the fully qualified
path name of that library to the linker command line.

> > 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
What was meant is "-lldap -lcrypto".  Libraries  later  in  later
flags  have to satisfy references left open by earlier libraries.

> 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
You are linking statically to a library that some other  library,
namely  libldap,  want's to link dynamically. How's that supposed
to work? Static linking means you have a  copy  of  libcrypto  in
your  binary,  with  the symbols of that library removed, because
they have already been resolved. Then libldap  gets  linked,  and
wants to know about the same symbols once again, so a shared copy
of the library libcrypto has to be added to  the  address  space.
What  a mess. So the real question is: WTH are you trying to link
statically!

Mit herzlichem Gruss

                                        Andreas Müller

--
Prof. Dr. Andreas Müller, Beratung und Entwicklung
Bubental 53,                   CH - 8852 Altendorf
Email:                  andreas.muel...@othello.ch
Voice: +41 55 4621483          Fax: +41 55 4621482

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

Reply via email to