cURL / Mailing Lists / curl-library / Single Mail

curl-library

__imp__timeGetTime@0 (Was RE: Linking problems (_BN_* stuff))

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

Hi, I managed to get rid of the _BN* multiple definitions errors by renaming those functions in the OpenSSL code (and of course updating all the calls to use the new names) and rebuilding OpenSSL and libcurl.

If anyone has easier solutions, I would love to hear them. I don't want to have to do this every time I need to get an updated OpenSSL. :(

By the way, I was also getting the following error:

libcurl.lib(timeval.obj) : error LNK2001: unresolved external symbol __imp__timeGetTime_at_0

It turns out I also needed to add $(WINLIBS) in Makefile.VC6 for the release-ssl config.

Thanks,
Ever

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

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