On 19.07.2011 07:20, brandon...@aol.com wrote:
Actually, I was advised to put libssl after libcrypto.
I'm afraid that is the wrong order. See below.
I don't recall being told to put libssl after libldap.
Yep, may be. The rule is that libs with objects that are used by another lib must be placed after that lib. Since libldap uses libssl, libldap must be placed before libssl.
Also, knowing that order matters is of little use if you don't grasp what the order should be.
That's true, but sometimes you can guess or you see that one library needs another one by looking at the error messages: *From:* brandon...@aol.com <mailto:brandon...@aol.com>
*Sent:* Monday, July 18, 2011 4:46 PM I put the -static where it belongs. Here is a partial list of the output: /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../libldap.a(tls_o.o): In function `tlso_sb_close': (.text+0xa6): undefined reference to `SSL_shutdown'
Here you see that the function tlso_sb_close needs SSL_shutdown and that tlso_sb_close is in tls_o.o, which is in libldap.a. Guess, where you can find SSL_shutdown? ;-) Here is a simplified example that links statically with libssl (and libcrypto), but not with libldap: g++ -o my_prog.exe my_prog.o ../../my_lib/mylib.a \ -static /usr/local/xx/lib/libtiff.a \ /usr/local/xx/lib/libssl.a /usr/local/xx/lib/libcrypto.a \ -lws2_32 Since libldap needs libssl, you can put it where the example has libtiff.a (you won't need that anyway, it's only an example), and you should be done ... unless libldap has other dependencies on libs that are not mentioned here. You'd need to look up this in the libldap docs. HTH -- Regards Albrecht ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org