[Botan-devel] Modularisation and other changes

Joel Low joel at joelsplace.sg
Wed Oct 1 03:48:02 EDT 2008


OK, ignore the std::swap bit. I checked my reference and it was there;
but now I don't have an explanation as to why it wouldn't compile.

Regards,
Joel


> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Joel Low
> Sent: Wednesday, 1 October, 2008 3:46 PM
> To: Botan development list
> Subject: Re: [Botan-devel] Modularisation and other changes
> 
> On another note, after I included boost::tr1, I've got more errors:
> 
>         cl.exe /Ibuild\include /O2 /Zi
/DBOTAN_DLL=__declspec(dllexport)
> /GL  "/ID:\Develo
> pment\Libraries\C++\Boost"
> "/ID:\Development\Libraries\C++\Boost\boost\tr1" /MDd "/Fdbuil
> d\lib\libbotan.pdb"  /EHsc /GR /D_CONSOLE  /nologo /c
> ..\src\math\gfpmath\gfp_element.cpp
> /Fobuild\lib\dlld\gfp_element.obj
> gfp_element.cpp
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\vector(1416) : see reference
>  to class template instantiation 'std::_Vb_iter_base<_MycontTy>' being
> compiled
>         with
>         [
>             _MycontTy=bool
>         ]
>         ..\src\math\gfpmath\gfp_element.cpp(583) : see reference to
> class template instant
> iation 'std::_Vb_reference<_MycontTy>' being compiled
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2039: 'differe
> nce_type' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2146: syntax e
> rror : missing ',' before identifier 'difference_type'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2065: 'differe
> nce_type' : undeclared identifier
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1325) :
> error C2955: 'std::_R
> anit' : use of class template requires template argument list
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\xutility(565) : see declarat
> ion of 'std::_Ranit'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2039: 'size_ty
> pe' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2146: syntax e
> rror : missing ';' before identifier '_Myoff'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C4430: missing
> type specifier - int assumed. Note: C++ does not support default-int
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2327: 'std::_V
> b_iter_base<_MycontTy>::size_type' : is not a type name, static, or
> enumerator
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2039: 'size_ty
> pe' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2146: syntax e
> rror : missing ';' before identifier '_My_actual_offset'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2086: 'bool st
> d::_Vb_iter_base<_MycontTy>::size_type' : redefinition
>         with
>         [
>             _MycontTy=bool
>         ]
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\vector(1380) : see declarati
> on of 'std::_Vb_iter_base<_MycontTy>::size_type'
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1404) :
> error C4430: missing
> type specifier - int assumed. Note: C++ does not support default-int
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1404) :
> warning C4183: '_My_a
> ctual_offset': missing return type; assumed to be a member function
> returning 'int'
>         cl.exe /Ibuild\include /O2 /Zi
/DBOTAN_DLL=__declspec(dllexport)
> /GL  "/ID:\Develo
> pment\Libraries\C++\Boost"
> "/ID:\Development\Libraries\C++\Boost\boost\tr1" /MDd "/Fdbuil
> d\lib\libbotan.pdb"  /EHsc /GR /D_CONSOLE  /nologo /c
> ..\src\math\gfpmath\point_gfp.cpp /F
> obuild\lib\dlld\point_gfp.obj
> point_gfp.cpp
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\vector(1416) : see reference
>  to class template instantiation 'std::_Vb_iter_base<_MycontTy>' being
> compiled
>         with
>         [
>             _MycontTy=bool
>         ]
>         ..\src\math\gfpmath\point_gfp.cpp(843) : see reference to
class
> template instantia
> tion 'std::_Vb_reference<_MycontTy>' being compiled
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2039: 'differe
> nce_type' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2146: syntax e
> rror : missing ',' before identifier 'difference_type'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1323) :
> error C2065: 'differe
> nce_type' : undeclared identifier
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1325) :
> error C2955: 'std::_R
> anit' : use of class template requires template argument list
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\xutility(565) : see declarat
> ion of 'std::_Ranit'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2039: 'size_ty
> pe' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C2146: syntax e
> rror : missing ';' before identifier '_Myoff'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1380) :
> error C4430: missing
> type specifier - int assumed. Note: C++ does not support default-int
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2825: '_Mycont
> Ty': must be a class or namespace when followed by '::'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2327: 'std::_V
> b_iter_base<_MycontTy>::size_type' : is not a type name, static, or
> enumerator
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2039: 'size_ty
> pe' : is not a member of '`global namespace''
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2146: syntax e
> rror : missing ';' before identifier '_My_actual_offset'
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1403) :
> error C2086: 'bool st
> d::_Vb_iter_base<_MycontTy>::size_type' : redefinition
>         with
>         [
>             _MycontTy=bool
>         ]
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\include\vector(1380) : see declarati
> on of 'std::_Vb_iter_base<_MycontTy>::size_type'
>         with
>         [
>             _MycontTy=bool
>         ]
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1404) :
> error C4430: missing
> type specifier - int assumed. Note: C++ does not support default-int
> C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(1404) :
> warning C4183: '_My_a
> ctual_offset': missing return type; assumed to be a member function
> returning 'int'
> 
> It seems as though the code uses "std::swap", though googling
std::swap
> doesn't return any functions. There isn't an "std::swap" as far as I
> know (all the swap functions are member functions of classes: hence
why
> I think std::vector is thrown into the mess in the error message).
> 
> Regards,
> Joel
> 
> 
> > -----Original Message-----
> > From: Joel Low
> > Sent: Wednesday, 1 October, 2008 1:55 PM
> > To: botan-devel at randombit.net
> > Subject: RE: [Botan-devel] Modularisation and other changes
> >
> > Hey,
> >
> > Well.. __declspec(dllimport) tells the compiler the definition is in
> a
> > DLL. __declspec(dllexport) tells the compiler to make the definition
> > available to other programs. So, it should be defined as
> > __declspec(dllimport) (since it is a fallback); AND in the makefile,
> we
> > must define the pre-processor symbol BOTAN_DLL to be
> > __declspec(Dllexport), to overwrite the defaults.
> >
> > Sorry, it's kinda confusing, but doing this allows users to just
> > #include <botan/botan.h> and it'll work as expected... We could also
> > use the Boost autolinking bits and use #pragma comment in future, if
> > you're interested.
> >
> > > Yes, InSiTo (whence comes the ECC/GF(p) code) uses tr1. I removed
> > > almost all of the tr1 uses but some remain in the GF(p) math. I
> plan
> > > to remove them prior all to the next release, but they are indeed
> > > there for the moment. I'm actually a bit torn about that because
> > > shared_ptr would be a very handy thing to have generally.
> > >
> > > As to the implementation, Boost TR1
> > > (http://www.boost.org/doc/libs/1_36_0/doc/html/boost_tr1.html)
> should
> > > work as a replacement. The only thing that is being used (AFAIK)
is
> > > shared_ptr.
> > >
> > [Joel Low] Yes I tend to agree on that. Hmm. Is boost too large a
> > dependency to ask for?
> >
> > Regards,
> > Joel
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel
> 




More information about the botan-devel mailing list