Hi there,

> I'm currently having some problems compiling the OpenSSL libraries into my
> project.  I'm using VC++ V6 on NT4 to produce an ATL COM project.  However,
> there seems to be some conflicts between the OpenSSL libraries and those
> supplied by Microsoft.
> Firstly there appears to be some redefinitions of items appearing in
> WINCRYPT.H
> 
> e.g.
> //+-------------------------------------------------------------------------
> //  Predefined PKCS #7 data structures that can be encoded / decoded.
> //--------------------------------------------------------------------------
> #define PKCS7_SIGNER_INFO                   ((LPCSTR) 500)

Can't help you with that bit I'm afraid.

> The symbol PKCS7_SIGNER_INFO is used in the OpenSSL code, but more worrying
> after commenting these lines out of the WINCRYPT header file I get
> redefinition errors from the linker:-
> 
> Generating Code...
> Linking...
> MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in
> LIBCMTD.lib(sprintf.obj)
[snip]

This happens because the object files you have built up until that point
have been compiled for libcmtd.lib (the debug libc runtime library) but
this link phase is trying to link with the openssl libraries which have
been linked against the msvcrt runtime library. If you try building your
existing app with MSVCRT you should find the error goes away, or you could
try rebuilding openssl with the same c runtime you're using. Note, you
appear to be building with the debug version libraries here so you may
want to also match that up between the two.

As for how to do that - not sure, could involve some hacking. In OpenSSL,
you should be able to control it by changing the appropriate flag passed
to the compiler (cl.exe), and by changing the appropriate flag and
possibly also library passed to the linker (link.exe). For your own code,
that will depend on what you are doing and how. Hope that helps?

Cheers,
Geoff



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to