Although I've been programming on various platforms for quite awhile, I don't know much about the principles involved here - i.e. Linux or static vs dynamix linking. You are right, it is linking to libldap.
What I am trying to do is remove all dependencies on libraries on the diverse target machines, so that it works right out of the box without the necessity of the user installing libraries. On several machines where people have installed my program, it complained that it couldn't find libcrypto.so.8. I fixed that on those occasions by creating a symbolic link to their actual version of libcrypto, but I just want it to stop looking for any library at all on the box where I'm putting it, and this is one step towards that. I had hoped that by forcing it to take libcrypto.a, rather than libcrypto.so, it would stop looking for libcrypto.so.8. -----Original Message----- From: Andreas Mueller <andreas.muel...@othello.ch> To: openssl-users <openssl-users@openssl.org> Sent: Sun, Jul 17, 2011 2:45 pm Subject: Re: Trying to Link Statically to Libcrypto 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 t would certainly help if you actually knew what it was saying, ot just believed it! And wasn't it rather libldap.so, not penldap.so. Of course, libldap.so is usually provided by some penldap package. > I am already linking in -lldap. Will -lopenldap work better? e certainly meant -lldap (the library is called libldap.so, so he linker flag is called -lldap). If your library really is alled openldap.so (which I very much doubt), then you can not ink it with the -l option, you have to add the fully qualified ath 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 hat was meant is "-lldap -lcrypto". Libraries later in later lags 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 ou are linking statically to a library that some other library, amely libldap, want's to link dynamically. How's that supposed o work? Static linking means you have a copy of libcrypto in our binary, with the symbols of that library removed, because hey have already been resolved. Then libldap gets linked, and ants to know about the same symbols once again, so a shared copy f the library libcrypto has to be added to the address space. hat a mess. So the real question is: WTH are you trying to link tatically! Mit herzlichem Gruss Andreas Müller -- rof. Dr. Andreas Müller, Beratung und Entwicklung ubental 53, CH - 8852 Altendorf mail: andreas.muel...@othello.ch oice: +41 55 4621483 Fax: +41 55 4621482 ______________________________________________________________________ penSSL Project http://www.openssl.org ser Support Mailing List openssl-users@openssl.org utomated List Manager majord...@openssl.org