> > drh> compiling code that is going to be linked into the DLL you need to
> > drh> precede the variable with:
> > drh>
> > drh> _declspec( dllexport )
> > drh>
> > drh> however when linking to these variables you need:
> > drh>
> > drh> _declspec( dllimport )
> > drh>
> > drh> So the declaration needs to be different according to whether the DLL
> > drh> code is being compiled or linked to.
> >
> > drh> Any thoughts?
> >
> variables defined in OpenSSL and export some of their own which the new
> ASN1 macros create. So the stuff in the OpenSSL headers needs to be the
> import declaration whereas stuff in the additional DLLs headers needs to
> be the export declaration when the DLL is being built.
>
The way this is traditionally handled is to conditionally define the
macro based upon another macro which is either set or not set based
upon whether or not OpenSSL itself is being built.
#ifndef OPENSSL_EXTERN
#ifdef BUILDING_OPENSSL
#define OPENSSL_EXTERN __declspec(dllexport)
#else
#define OPENSSL_EXTERN __declspec(dllimport)
#endif
#endif
Jeffrey Altman * Sr.Software Designer C-Kermit 7.1 Alpha available
The Kermit Project @ Columbia University includes Secure Telnet and FTP
http://www.kermit-project.org/ using Kerberos, SRP, and
[EMAIL PROTECTED] OpenSSL. SSH soon to follow.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]