cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Linking problems (_BN_* stuff)

From: Olano, Ever <eolano_at_cybersource.com>
Date: Fri, 25 Jun 2004 14:12:13 -0700

I realized right after sending my message below that those are actually defined in OpenSSL, not in libcurl. :(

What to do? Does anyone have any good workaround for multiple definitions? It's weird how I get the LNK4006 warnings and LNK2005 errors at the same time. How do I get rid of the LNK2005's? I think I can live with the warnings as I have in previous projects.

Thanks,
Ever

-----Original Message-----
From: Olano, Ever
Sent: Friday, June 25, 2004 2:08 PM
To: 'curl-library_at_cool.haxx.se'
Subject: Linking problems (_BN_* stuff)

Hello. I managed to create a static libcurl with OpenSSL by modifying Makefile.VC6 to include $(SSLLIBS) in the value assigned to LNK for the release-ssl config. I got tons of warnings but I read in one of the posts that one person just ignored them and it worked for them fine.

However, in my DLL, I link in other third-party stuff that includes a pre-built library called bsafe60.lib. Unfortunately, I get the following errors:

bsafe60.lib(bn_div.obj) : error LNK2005: _BN_div already defined in libcurl.lib(bn_div.obj)
bsafe60.lib(bn_gcd.obj) : error LNK2005: _BN_gcd already defined in libcurl.lib(bn_gcd.obj)
bsafe60.lib(bn_gcd.obj) : error LNK2005: _BN_mod_inverse already defined in libcurl.lib(bn_gcd.obj)
bsafe60.lib(bn_div.obj) : warning LNK4006: _BN_div already defined in libcurl.lib(bn_div.obj); second definition ignored
bsafe60.lib(bn_gcd.obj) : warning LNK4006: _BN_gcd already defined in libcurl.lib(bn_gcd.obj); second definition ignored
bsafe60.lib(bn_gcd.obj) : warning LNK4006: _BN_mod_inverse already defined in libcurl.lib(bn_gcd.obj); second definition ignored

The only workaround I can think of is eliminate the definitions in libcurl (and possibly link bsafe60.lib into libcurl so as to not cause unresolved external errors). But I could not find any of those symbols in any of the source files.

I would appreciate any help, as usual.

Thanks,
Ever
Received on 2004-06-25