[Botan-devel] Botan 1.5.10 - Compilation issue under VS .net 2003

Templie Cédric cedric.templie at echotech.ch
Tue Aug 29 08:28:24 EDT 2006


Hello,

Here is the code I use to finally compile fine:

in x509stat.cpp

I replace code for "Set up a new global state for X.509"

by (basically declare prototype outside the method):

/*************************************************
* Set up a new global state for X.509            *
*************************************************/
#define CREATE_PROTOTYPE(NAME, TYPE)                      \
   struct TYPE ## _Prototype : public Extension_Prototype \
      {                                                   \
      Certificate_Extension* make(const OID& oid)         \
         {                                                \
         if(oid == Botan::OIDS::lookup(NAME))             \
         return new Botan::Cert_Extension::TYPE();        \
         return 0;                                        \
         }                                                \
      };                                                  \

    CREATE_PROTOTYPE("X509v3.KeyUsage", Key_Usage);
    CREATE_PROTOTYPE("X509v3.BasicConstraints", Basic_Constraints);
    CREATE_PROTOTYPE("X509v3.SubjectKeyIdentifier", Subject_Key_ID);
    CREATE_PROTOTYPE("X509v3.AuthorityKeyIdentifier", Authority_Key_ID);
    CREATE_PROTOTYPE("X509v3.ExtendedKeyUsage", Extended_Key_Usage);
    CREATE_PROTOTYPE("X509v3.IssuerAlternativeName", 
Issuer_Alternative_Name);
    CREATE_PROTOTYPE("X509v3.SubjectAlternativeName", 
Subject_Alternative_Name);
    CREATE_PROTOTYPE("X509v3.CRLNumber", CRL_Number);
    CREATE_PROTOTYPE("X509v3.CertificatePolicies", Certificate_Policies);

X509_GlobalState::X509_GlobalState()
{
    add(new Key_Usage_Prototype);
    add(new Basic_Constraints_Prototype);
    add(new Subject_Key_ID_Prototype);
    add(new Authority_Key_ID_Prototype);
    add(new Extended_Key_Usage_Prototype);
    add(new Issuer_Alternative_Name_Prototype);
    add(new Subject_Alternative_Name_Prototype);
    add(new CRL_Number_Prototype);
    add(new Certificate_Policies_Prototype);
}

Now the library compile fine.

I do not know if these compilation issues are due to my configuration or 
if you had same issues.
Nevertheless, I hope that these reports may help ;)

Thanks

Templie Cédric

Templie Cédric wrote:
> Hello again,
>
> Issues C2326 was fixed by moving classes declarations for DN_Matcher 
> in the namespace scope instead of just in the method.
> I had to do the same for other files: x509cert.cpp, x509find.cpp
>
> Another issue appear, here is compilation error:
>
> x509stat.cpp
> src\x509stat.cpp(59) : error C2326: 'Botan::Certificate_Extension 
> *Botan::X509_GlobalState::__ctor::Key_Usage_Prototype::make(const 
> Botan::OID &)' : function cannot access 'Botan::OIDS' *--> Fixed by 
> using Botan::OIDS::lookup(NAME)*
> src\x509stat.cpp(59) : error C2326: 'Botan::Certificate_Extension 
> *Botan::X509_GlobalState::__ctor::Key_Usage_Prototype::make(const 
> Botan::OID &)' : function cannot access 'Botan::operator`=='' **
> src\x509stat.cpp(59) : error C2326: 'Botan::Certificate_Extension 
> *Botan::X509_GlobalState::__ctor::Key_Usage_Prototype::make(const 
> Botan::OID &)' : function cannot access 'Botan::Cert_Extension'* --> 
> Fixed by using Botan::Cert_Extension::TYPE()*
> ...
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
>
> Thanks again
>
> Templie Cédric
>
> Templie Cédric wrote:
>> Hello,
>>
>> Thanks, I will nevertheless continue to post issues I found here :)
>>
>> So in order to pass the previous issue I did the following :
>> I use: *global_config().option_as_list("rng/ms_capi_prov_type");* 
>> instead of Config::get_list(...);
>>
>> A new issue appear:
>>
>>    x509cert.cpp
>>    src\x509cert.cpp(290) : error C2326: 'bool 
>> Botan::create_dn::DN_Matcher::operator ()(const _STL::string &,const 
>> _STL::string &) const' : function cannot access         
>> 'Botan::operator`!=''
>>    NMAKE : fatal error U1077: 'cl' : return code '0x2'
>>    Stop.
>>
>> I have no clue at all about the issue.
>>
>> Thanks again
>>
>> Templie Cédric
>>
>> Joel Low wrote:
>>> Jack is away at the moment, I've informed him a while earlier and he 
>>> should
>>> be back in business sometime this week.
>>>
>>> Joel
>>>
>>>  
>>>> -----Original Message-----
>>>> From: Templie Cédric [mailto:cedric.templie at echotech.ch]
>>>> Sent: 28 August 2006 8:50 PM
>>>> To: botan-devel at randombit.net
>>>> Subject: [Botan-devel] Botan 1.5.10 - Compilation issue under VS .net
>>>> 2003
>>>>
>>>> Hello,
>>>>
>>>> I just retrieve the 1.5.10 version of Botan and try to compile it
>>>> under VS .net 2003 and STLPort
>>>>
>>>> I add some compilation flags: /Zc:wchar_t /Zc:forScope /DUNICODE
>>>> /D_UNICODE /DNDEBUG /DWIN32 /D_WINDOWS /D_USRDLL (Nevertheless build
>>>> failed even without these flags)
>>>>
>>>> Here is the compilation issue I have:
>>>>
>>>>     modules\es_capi\es_capi.cpp(77) : error C2039: 'get_list' : is not
>>>> a member of 'Botan::Config'
>>>>             build\include\botan\config.h(21) : see declaration of
>>>> 'Botan::Config'
>>>>     modules\es_capi\es_capi.cpp(77) : error C3861: 'get_list':
>>>> identifier not found, even with argument-dependent lookup
>>>>     NMAKE : fatal error U1077: 'cl' : return code '0x2'
>>>>     Stop.
>>>>
>>>> I check the config.h file and did not find the get_list method.....
>>>>
>>>> Could someone help me please.
>>>>
>>>> Thanks in advance
>>>>
>>>> Templie Cédric
>>>> _______________________________________________
>>>> botan-devel mailing list
>>>> botan-devel at randombit.net
>>>> http://www.randombit.net/mailman/listinfo/botan-devel
>>>>
>>>>     
>>>
>>>
>>>
>>> _______________________________________________
>>> botan-devel mailing list
>>> botan-devel at randombit.net
>>> http://www.randombit.net/mailman/listinfo/botan-devel
>>>
>>>
>>>
>>>   
>>
>> _______________________________________________
>> botan-devel mailing list
>> botan-devel at randombit.net
>> http://www.randombit.net/mailman/listinfo/botan-devel
>>
>>
>>
>
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
>
>
>



More information about the botan-devel mailing list