So I've read this thread, and had a look at the code.  What do I have to do
to fix this error? (exactly)
 
Thank you!
 
Brendan Law
 
 
<original thread>
 
The ticket #425 is indeed closable.

That note "#define OPENSSL_EXPORT_VAR_AS_FUNCTION" made me check my own
doings again (with a magnifying glass)... That error ended up being my
careless mistake :-( Sorry for all the trouble. OpenSSL is doing everything
right. Combination: NT4 + SP6a + VC++(12.00.8804) passed all the tests.

        Yours  VW


-----Original Message-----
From: Stephen Henson via RT [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 2:53 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [openssl.org #425] Build error on Windows NT4? 



[EMAIL PROTECTED] - Wed Jan  1 18:40:53 2003]:

> > >         cl ... -c .\crypto\asn1\n_pkey.c
> > > .\crypto\asn1\n_pkey.c(96) : error C2370:
>    'NETSCAPE_ENCRYPTED_PKEY_it' :
> > > redefinition; different storage class
> > >         .\crypto\asn1\n_pkey.c(93) : see declaration of
> > > 'NETSCAPE_ENCRYPTED_PKEY_it'
> >
> > Strange, I checked VC++ 6.0 SP3 and had no problems. What version of
> > VC++ are you using?
> 
> First of all I want to make it clear that I do *not* have environment
> for VC-WIN32 build. All I say here is based on experinence not related
> to OpenSSL.
> 
> How does one tell VC++SP level? I couldn't find a way. It's probably
> more appropriate to ask for version number returned by cl. Mine says
> 12.00.8804...
> 

Well the version is in the about box of visual studio. Not sure about
the SP level, I just know I installed SP3 on this box and I'll try SP5
when I can find time to download the 100Mb or so of it...

I also have cl version 12.00.8804 BTW

> In either case I believe it's OPENSSL_EXTERN which is "responsible"
>    for
> this. On Windows OPENSLL_EXTERN is[?]/can be defined as "extern
> _declspec(dllimport)" and the problem must be that n_pkey.c refers to
> same variable as both local and OPENSSL_EXTERN. The catch is that
> _decspec(dllimport) is [and has to be] treated differently. Most
>    notably
> "_declspec(dllimport) int i; int foo(){return i;}" effectively
>    compiles
> as "int *_i; int foo() {return *_i;}." As you can see generated
>    machine
> code has to be substantially different from one generated for plain
>    "int
> i; int foo(){return i;}" and this is what the compiler must be
> complaining about. At the very least if I try to compile "int
> i;_declspec(dllimport) int i;" I get the very same error code, C2370.
> 
> A.
> 

I was a little puzzled by the original report. Because it seems to be
complaining about the NETSCAPE_ENCRYPTED_PKEY_it variable whereas under
Win32 this should in fact be a function. 

Win32 should #define OPENSSL_EXPORT_VAR_AS_FUNCTION which causes a
different part of asn1t.h to be used. This should end up being written
to opensslconf.h when perl Configure VC-WIN32 is initially called.

So the original poster might want to check to see if this is the case...

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

Reply via email to