Snaccv1.3r2 problems
阮孝緒 <[email protected]>
| Newsgroups | gmane.ietf.sfl |
|---|---|
| Message-ID | <002e01c00b22$e85a4ec0$58f7748c@ruan2000> |
Hi all!
I wrote a simple PKCS1.asn and compile it use Snaccv1.3r2 succefully
(use ..\snacc13rn\compiler\compiler\Debug\snacc.exe)
, but it will get errors when i compile pkcs1.h and pkcs1.cpp use MSVC6........
I am using winnt4.0 with SP6,MSVC6
My steps are:
step1.New a project(VC6)
step2.Add pkcs1.h and pkcs1.cpp to project
step3.In project settings,set pkcs1.cpp "Not using precompiled headers"
step4.In project settings,add "..\snacc13rn\c++-lib\inc"(depend on path)
and "..\snacc13rn" into "Additional include directories"
step5.compile pkcs1.cpp,19 errors:
e:\project\sfl\snacc13rn\c++-lib\inc\print.h(42) : error C2071: 'indentG' : illegal storage class
e:\project\sfl\snacc13rn\c++-lib\inc\print.h(43) : error C2071: 'stdIndentG' : illegal storage class
e:\project\sfl\snacc13rn\c++-lib\inc\print.h(45) : error C2487: 'Indent' : member of dll interface class may not be declared with dll interface
e:\project\sfl\snacc13rn\c++-lib\inc\print.h(47) : error C2487: '<<' : member of dll interface class may not be declared with dll interface
e:\project\sfl\snacc13rn\c++-lib\inc\print.h(47) : error C2804: binary 'operator <<' has too many parameters
e:\project\sfl\pkcs1\pkcs\pkcs1.h(95) : error C2071: 'pkcs1' : illegal storage class
e:\project\sfl\pkcs1\pkcs\pkcs1.h(96) : error C2071: 'md2WithRSAEncryption' : illegal storage class
e:\project\sfl\pkcs1\pkcs\pkcs1.h(97) : error C2071: 'md4WithRSAEncryption' : illegal storage class
e:\project\sfl\pkcs1\pkcs\pkcs1.h(98) : error C2071: 'md5WithRSAEncryption' : illegal storage class
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(16) : error C2059: syntax error : 'constant'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(16) : error C2373: 'pkcs1' : redefinition; different type modifiers
e:\project\sfl\pkcs1\pkcs\pkcs1.h(95) : see declaration of 'pkcs1'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(18) : error C2059: syntax error : 'constant'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(18) : error C2373: 'md2WithRSAEncryption' : redefinition; different type modifiers
e:\project\sfl\pkcs1\pkcs\pkcs1.h(96) : see declaration of 'md2WithRSAEncryption'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(20) : error C2059: syntax error : 'constant'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(20) : error C2373: 'md4WithRSAEncryption' : redefinition; different type modifiers
e:\project\sfl\pkcs1\pkcs\pkcs1.h(97) : see declaration of 'md4WithRSAEncryption'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(22) : error C2059: syntax error : 'constant'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(22) : error C2373: 'md5WithRSAEncryption' : redefinition; different type modifiers
e:\project\sfl\pkcs1\pkcs\pkcs1.h(98) : see declaration of 'md5WithRSAEncryption'
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(29) : error C2838: illegal qualified name in member declaration
e:\project\sfl\pkcs1\pkcs\pkcs1.cpp(29) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.
My pkcs1.asn is
PKCS1 DEFINITIONS ::=
BEGIN
RSAPublicKey ::= SEQUENCE {
modulus INTEGER,
publicExponent INTEGER}
RSAPrivateKey ::= SEQUENCE {
version Version,
modulus INTEGER,
publicExponent INTEGER,
privateExponent INTEGER,
prime1 INTEGER,
prime2 INTEGER,
exponent1 INTEGER,
exponent2 INTEGER,
coefficient INTEGER}
Version ::= INTEGER
pkcs1 OBJECT IDENTIFIER ::= { 1.2.840.113549.1.1 }
md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs1 2 }
md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs1 3 }
md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs1 4 }
END
How should i do??
And how could i do ?? Thanks !