NoRulez | 23 May 2012 18:59

Can't compile crypto++ on Mac OS X Lion

Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
NoRulez | 23 May 2012 19:00

Re: Can't compile crypto++ on Mac OS X Lion

Sorry, I forgot to say that I use Crypto++ 5.6.1.

Thanks in advance

Am 23. Mai 2012 um 18:59 schrieb NoRulez <norulez <at> me.com>:

Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
David Irvine | 23 May 2012 19:01
Favicon
Gravatar

Re: Can't compile crypto++ on Mac OS X Lion

Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 


On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
NoRulez | 23 May 2012 19:12

Re: Can't compile crypto++ on Mac OS X Lion

I use the following compiler flags:

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")

I've also attached the CMakeLists.txt file which I use to compile it.

Here is the output after the project is configured:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done

Best Regards


Am 23. Mai 2012 um 19:02 schrieb David Irvine <david.irvine <at> maidsafe.net>:

Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 

On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)

PROJECT(cryptopp)

#FILE(GLOB CRYPTOPP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
#FILE(GLOB CRYPTOPP_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

if(WIN32)
    add_definitions(-DCRYPTOPP_EXPORTS)
    add_definitions(-DCRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2=1)
else(WIN32)
    if(APPLE)
        add_definitions(-DCRYPTOPP_DISABLE_ASM)
        add_definitions(-DCRYPTOPP_DISABLE_SSE2)
    endif(APPLE)
endif(WIN32)

set(CRYPTOPP_LIB_HEADERS
    3way.h
    adler32.h
    aes.h
    algebra.h
    algparam.h
    arc4.h
    argnames.h
    asn.h
    authenc.h
    base32.h
    base64.h
    basecode.h
    #bench.h
    blowfish.h
    blumshub.h
    camellia.h
    cast.h
    cbcmac.h
    ccm.h
    channels.h
    cmac.h
    config.h
    cpu.h
    crc.h
    cryptlib.h
    default.h
    des.h
    dh.h
    dh2.h
    #dll.h
    dmac.h
    dsa.h
    eax.h
    ec2n.h
    eccrypto.h
    ecp.h
    elgamal.h
    emsa2.h
    eprecomp.h
    esign.h
    #factory.h
    files.h
    filters.h
    fips140.h
    fltrimpl.h
    gcm.h
    gf256.h
    gf2n.h
    gf2_32.h
    gfpcrypt.h
    gost.h
    gzip.h
    hex.h
    hmac.h
    hrtimer.h
    ida.h
    idea.h
    integer.h
    iterhash.h
    lubyrack.h
    luc.h
    mars.h
    md2.h
    md4.h
    md5.h
    mdc.h
    misc.h
    modarith.h
    modes.h
    modexppc.h
    mqueue.h
    mqv.h
    nbtheory.h
    network.h
    nr.h
    oaep.h
    oids.h
    osrng.h
    panama.h
    pch.h
    pkcspad.h
    polynomi.h
    pssr.h
    pubkey.h
    pwdbased.h
    queue.h
    rabin.h
    randpool.h
    rc2.h
    rc5.h
    rc6.h
    #resource.h
    rijndael.h
    ripemd.h
    rng.h
    rsa.h
    rw.h
    safer.h
    salsa.h
    seal.h
    secblock.h
    seckey.h
    seed.h
    serpent.h
    #serpentp.h
    sha.h
    shacal2.h
    shark.h
    simple.h
    skipjack.h
    smartptr.h
    socketft.h
    sosemanuk.h
    square.h
    stdcpp.h
    strciphr.h
    tea.h
    tiger.h
    trdlocal.h
    trunhash.h
    ttmac.h
    twofish.h
    #validate.h
    vmac.h
    wait.h
    wake.h
    whrlpool.h
    winpipes.h
    words.h
    xtr.h
    xtrcrypt.h
    zdeflate.h
    zinflate.h
    zlib.h
)

set(CRYPTOPP_LIB_SOURCES
    3way.cpp
    adhoc.cpp.proto
    adler32.cpp
    algebra.cpp
    algparam.cpp
    arc4.cpp
    asn.cpp
    authenc.cpp
    base32.cpp
    base64.cpp
    basecode.cpp
    #bench.cpp
    #bench2.cpp
    bfinit.cpp
    blowfish.cpp
    blumshub.cpp
    camellia.cpp
    cast.cpp
    casts.cpp
    cbcmac.cpp
    ccm.cpp
    channels.cpp
    cmac.cpp
    cpu.cpp
    crc.cpp
    cryptlib.cpp
    #cryptlib_bds.cpp
    #datatest.cpp
    default.cpp
    des.cpp
    dessp.cpp
    dh.cpp
    dh2.cpp
    dll.cpp
    #dlltest.cpp
    dsa.cpp
    eax.cpp
    ec2n.cpp
    eccrypto.cpp
    ecp.cpp
    elgamal.cpp
    emsa2.cpp
    eprecomp.cpp
    esign.cpp
    files.cpp
    filters.cpp
    fips140.cpp
    #fipsalgt.cpp
    fipstest.cpp
    gcm.cpp
    gf256.cpp
    gf2n.cpp
    gf2_32.cpp
    gfpcrypt.cpp
    gost.cpp
    gzip.cpp
    hex.cpp
    hmac.cpp
    hrtimer.cpp
    ida.cpp
    idea.cpp
    integer.cpp
    iterhash.cpp
    luc.cpp
    mars.cpp
    marss.cpp
    md2.cpp
    md4.cpp
    md5.cpp
    misc.cpp
    modes.cpp
    mqueue.cpp
    mqv.cpp
    nbtheory.cpp
    network.cpp
    oaep.cpp
    osrng.cpp
    panama.cpp
    pch.cpp
    pkcspad.cpp
    polynomi.cpp
    pssr.cpp
    pubkey.cpp
    queue.cpp
    rabin.cpp
    randpool.cpp
    rc2.cpp
    rc5.cpp
    rc6.cpp
    rdtables.cpp
    #regtest.cpp
    rijndael.cpp
    ripemd.cpp
    rng.cpp
    rsa.cpp
    rw.cpp
    safer.cpp
    salsa.cpp
    seal.cpp
    seed.cpp
    serpent.cpp
    sha.cpp
    shacal2.cpp
    shark.cpp
    sharkbox.cpp
    simple.cpp
    skipjack.cpp
    socketft.cpp
    sosemanuk.cpp
    square.cpp
    squaretb.cpp
    strciphr.cpp
    tea.cpp
    #test.cpp
    tftables.cpp
    tiger.cpp
    tigertab.cpp
    trdlocal.cpp
    ttmac.cpp
    twofish.cpp
    #validat1.cpp
    #validat2.cpp
    #validat3.cpp
    vmac.cpp
    wait.cpp
    wake.cpp
    whrlpool.cpp
    winpipes.cpp
    xtr.cpp
    xtrcrypt.cpp
    zdeflate.cpp
    zinflate.cpp
    zlib.cpp
)

ADD_LIBRARY(cryptlib ${CRYPTOPP_LIB_HEADERS} ${CRYPTOPP_LIB_SOURCES})
if(WIN32)
    target_link_libraries(cryptlib odbc32 odbccp32 ws2_32)
endif(WIN32)

set(CRYPTOPP_TEST_HEADERS
    bench.h
    factory.h
    validate.h
)

set(CRYPTOPP_TEST_SOURCES
    adhoc.cpp
    bench.cpp
    bench2.cpp
    datatest.cpp
    dlltest.cpp
    fipsalgt.cpp
    regtest.cpp
    test.cpp
    validat1.cpp
    validat2.cpp
    validat3.cpp
)

ADD_EXECUTABLE(cryptest ${CRYPTOPP_TEST_HEADERS} ${CRYPTOPP_TEST_SOURCES})
target_link_libraries(cryptest cryptlib)
David Irvine | 23 May 2012 19:16
Favicon
Gravatar

Re: Can't compile crypto++ on Mac OS X Lion

You could try this one of ours, it does seem to work ! not a great answer but perhaps a quick fix


David

On Wed, May 23, 2012 at 6:12 PM, NoRulez <norulez <at> me.com> wrote:
I use the following compiler flags:

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")

I've also attached the CMakeLists.txt file which I use to compile it.

Here is the output after the project is configured:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done

Best Regards


Am 23. Mai 2012 um 19:02 schrieb David Irvine <david.irvine <at> maidsafe.net>:


Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 

On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
#==============================================================================#
#                                                                              #
#  Copyright (c) 2012 MaidSafe.net limited                                     #
#                                                                              #
#  The following source code is property of MaidSafe.net limited and is not    #
#  meant for external use.  The use of this code is governed by the license    #
#  file licence.txt found in the root directory of this project and also on    #
#  www.maidsafe.net.                                                           #
#                                                                              #
#  You are not free to copy, amend or otherwise use this source code without   #
#  the explicit written permission of the board of directors of MaidSafe.net.  #
#                                                                              #
#==============================================================================#

cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
project(Cryptopp)
enable_testing()

set(CMAKE_DEBUG_POSTFIX _d)
set(CMAKE_RELWITHDEBINFO_POSTFIX _rwdi)
set(CMAKE_MINSIZEREL_POSTFIX _msr)

if(CMAKE_BUILD_TYPE MATCHES "Debug")
  set(TEST_POSTFIX ${CMAKE_DEBUG_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
  set(TEST_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
  set(TEST_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
endif()

include(CTest)

set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CONTINUOUS_DURATION 600)
set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 10)
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY true)

file(GLOB cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

if(CMAKE_CL_64)
  set(cryptopp_SOURCES ${cryptopp_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm)
  add_custom_command(OUTPUT $(IntDir)x64dll.obj
                     COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm"
                     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
                     VERBATIM)
  add_custom_command(OUTPUT $(IntDir)x64masm.obj
                     COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm"
                     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
                     VERBATIM)
endif()

# Not used
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eccrypto.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eprecomp.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/cryptlib_bds.cpp")

# Set up test
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/test.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp")

set(cryptopp_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp
                          ${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp)

list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/bench.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/factory.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/validate.h")

set(cryptopp_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/bench.h
                          ${CMAKE_CURRENT_SOURCE_DIR}/factory.h
                          ${CMAKE_CURRENT_SOURCE_DIR}/validate.h)

add_executable(cryptest ${cryptopp_TEST_SOURCES} ${cryptopp_TEST_HEADERS})

add_library(cryptopp STATIC ${cryptopp_SOURCES} ${cryptopp_HEADERS})

set_target_properties(cryptest cryptopp PROPERTIES FOLDER "Third Party/Crypto++")

add_custom_command(TARGET cryptest
                     POST_BUILD
                     COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData $<TARGET_FILE_DIR:cryptest>/TestData)
add_custom_command(TARGET cryptest
                     POST_BUILD
                     COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors $<TARGET_FILE_DIR:cryptest>/TestVectors)
add_custom_command(TARGET cryptest
                     POST_BUILD
                     COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData ${CMAKE_BINARY_DIR}/TestData)
add_custom_command(TARGET cryptest
                     POST_BUILD
                     COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors ${CMAKE_BINARY_DIR}/TestVectors)
# if(NOT MSVC)
#   set_target_properties(cryptest PROPERTIES
#                           DEBUG_OUTPUT_NAME cryptest${CMAKE_DEBUG_POSTFIX}
#                           RELWITHDEBINFO_OUTPUT_NAME cryptest${CMAKE_RELWITHDEBINFO_POSTFIX}
#                           MINSIZEREL_OUTPUT_NAME cryptest${CMAKE_MINSIZEREL_POSTFIX})
# 
# endif()

# install(TARGETS cryptopp ARCHIVE DESTINATION lib)

target_link_libraries(cryptest cryptopp)

if(UNIX)
  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    add_definitions(-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION)
    set_target_properties(cryptopp cryptest PROPERTIES
                            COMPILE_FLAGS "-Wno-tautological-compare -fPIC -Wno-c++11-narrowing -std=c++11 -stdlib=libc++")
    set_target_properties(cryptest PROPERTIES LINK_FLAGS_RELEASE "-stdlib=libc++" LINK_FLAGS "-stdlib=libc++")
  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
    if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
        set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe
-finline-functions -std=c++11")

    elseif(GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
        set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe
-finline-functions -std=c++0x")
    else()
      message(FATAL "Unsupported verion of GCC, minimum 4.6 required")
    endif()
  endif()
elseif(MSVC)
  set_target_properties(cryptopp PROPERTIES
                          COMPILE_FLAGS "/D_WINDOWS /DUSE_PRECOMPILED_HEADERS /DWIN32 /D_VC80_UPGRADE=0x0710 /EHsc /W3")
  set_target_properties(cryptest PROPERTIES
                          COMPILE_FLAGS "/D_CONSOLE /DWIN32 /D_VC80_UPGRADE=0x0710 /D_MBCS /EHsc /W3"
                          LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF /LTCG"
                          LINK_FLAGS_RELWITHDEBINFO "/LTCG"
                          LINK_FLAGS_MINSIZEREL "/LTCG")
  set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /Oi /Oy /GL /DNDEBUG /GF /MT /Gy /Zi")
  set(CMAKE_CXX_FLAGS_DEBUG "/Od /Oi /D_DEBUG /MTd /Zi")
  list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dll.cpp") # this file doesn't use
precompiled headers
  list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/iterhash.cpp") # this file
doesn't use precompiled headers
  list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp") # this file is used to
create precompiled headers
  set_source_files_properties(${cryptopp_SOURCES} PROPERTIES
                                COMPILE_FLAGS "/Yu\"pch.h\"")
  set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES
                                COMPILE_FLAGS "/Yc\"pch.h\"")
  target_link_libraries(cryptest odbc32.lib odbccp32.lib Ws2_32.lib)
endif()

add_test(NAME CryptoppTest.BEH_FULL COMMAND $<TARGET_FILE:cryptest> v WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_AES COMMAND $<TARGET_FILE:cryptest> tv aes WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_SHA COMMAND $<TARGET_FILE:cryptest> tv sha WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PSS COMMAND $<TARGET_FILE:cryptest> tv rsa_pss
WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_OAEP COMMAND $<TARGET_FILE:cryptest> tv rsa_oaep
WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PKCS1_1_5 COMMAND $<TARGET_FILE:cryptest> tv rsa_pkcs1_1_5
WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)

set_property(TEST CryptoppTest.BEH_FULL PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_FULL PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_AES PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_AES PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_SHA PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_SHA PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY LABELS Common common Behavioural
CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY TIMEOUT 60)
David Irvine | 23 May 2012 19:17
Favicon
Gravatar

Re: Can't compile crypto++ on Mac OS X Lion

If you also check the archives here you will see a patch by Fraser Hutchison which fixes some c++11 issues  when used with clang, you will need that patch applied (it is a valid error in the code anyhow). 


On Wed, May 23, 2012 at 6:16 PM, David Irvine <david.irvine <at> maidsafe.net> wrote:
You could try this one of ours, it does seem to work ! not a great answer but perhaps a quick fix

David


On Wed, May 23, 2012 at 6:12 PM, NoRulez <norulez <at> me.com> wrote:
I use the following compiler flags:

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")

I've also attached the CMakeLists.txt file which I use to compile it.

Here is the output after the project is configured:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done

Best Regards


Am 23. Mai 2012 um 19:02 schrieb David Irvine <david.irvine <at> maidsafe.net>:


Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 

On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
NoRulez | 23 May 2012 20:15

Re: Can't compile crypto++ on Mac OS X Lion

Thanks for your file.

There are the same errors on Mac OS X Lion.
Under windows the build also breaks with MinGW.

I've attached a patch for MinGW if your are interessted.

Best Regards

Am 23. Mai 2012 um 19:16 schrieb David Irvine <david.irvine <at> maidsafe.net>:

You could try this one of ours, it does seem to work ! not a great answer but perhaps a quick fix

David

On Wed, May 23, 2012 at 6:12 PM, NoRulez <norulez <at> me.com> wrote:
I use the following compiler flags:

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")

I've also attached the CMakeLists.txt file which I use to compile it.

Here is the output after the project is configured:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done

Best Regards


Am 23. Mai 2012 um 19:02 schrieb David Irvine <david.irvine <at> maidsafe.net>:


Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 

On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

#==============================================================================#
# #
# Copyright (c) 2012 MaidSafe.net limited #
# #
# The following source code is property of MaidSafe.net limited and is not #
# meant for external use. The use of this code is governed by the license #
# file licence.txt found in the root directory of this project and also on #
# www.maidsafe.net. #
# #
# You are not free to copy, amend or otherwise use this source code without #
# the explicit written permission of the board of directors of MaidSafe.net. #
# #
#==============================================================================#

cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
project(Cryptopp)
enable_testing()

set(CMAKE_DEBUG_POSTFIX _d)
set(CMAKE_RELWITHDEBINFO_POSTFIX _rwdi)
set(CMAKE_MINSIZEREL_POSTFIX _msr)

if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(TEST_POSTFIX ${CMAKE_DEBUG_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(TEST_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
set(TEST_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
endif()

include(CTest)

set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CONTINUOUS_DURATION 600)
set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 10)
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY true)

file(GLOB cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

if(CMAKE_CL_64)
set(cryptopp_SOURCES ${cryptopp_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm)
add_custom_command(OUTPUT $(IntDir)x64dll.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm"
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
VERBATIM)
add_custom_command(OUTPUT $(IntDir)x64masm.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm"
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
VERBATIM)
endif()

# Not used
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eccrypto.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eprecomp.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/cryptlib_bds.cpp")


# Set up test
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/test.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp")

set(cryptopp_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp
${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp
${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp)

list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/bench.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/factory.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/validate.h")

set(cryptopp_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/bench.h
${CMAKE_CURRENT_SOURCE_DIR}/factory.h
${CMAKE_CURRENT_SOURCE_DIR}/validate.h)


add_executable(cryptest ${cryptopp_TEST_SOURCES} ${cryptopp_TEST_HEADERS})

add_library(cryptopp STATIC ${cryptopp_SOURCES} ${cryptopp_HEADERS})

set_target_properties(cryptest cryptopp PROPERTIES FOLDER "Third Party/Crypto++")

add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData $<TARGET_FILE_DIR:cryptest>/TestData)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors $<TARGET_FILE_DIR:cryptest>/TestVectors)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData ${CMAKE_BINARY_DIR}/TestData)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors ${CMAKE_BINARY_DIR}/TestVectors)
# if(NOT MSVC)
# set_target_properties(cryptest PROPERTIES
# DEBUG_OUTPUT_NAME cryptest${CMAKE_DEBUG_POSTFIX}
# RELWITHDEBINFO_OUTPUT_NAME cryptest${CMAKE_RELWITHDEBINFO_POSTFIX}
# MINSIZEREL_OUTPUT_NAME cryptest${CMAKE_MINSIZEREL_POSTFIX})
#
# endif()

# install(TARGETS cryptopp ARCHIVE DESTINATION lib)

target_link_libraries(cryptest cryptopp)

if(UNIX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions(-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION)
set_target_properties(cryptopp cryptest PROPERTIES
COMPILE_FLAGS "-Wno-tautological-compare -fPIC -Wno-c++11-narrowing -std=c++11 -stdlib=libc++")
set_target_properties(cryptest PROPERTIES LINK_FLAGS_RELEASE "-stdlib=libc++" LINK_FLAGS "-stdlib=libc++")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe -finline-functions -std=c++11")

elseif(GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe -finline-functions -std=c++0x")
else()
message(FATAL "Unsupported verion of GCC, minimum 4.6 required")
endif()
endif()
elseif(MSVC)
set_target_properties(cryptopp PROPERTIES
COMPILE_FLAGS "/D_WINDOWS /DUSE_PRECOMPILED_HEADERS /DWIN32 /D_VC80_UPGRADE=0x0710 /EHsc /W3")
set_target_properties(cryptest PROPERTIES
COMPILE_FLAGS "/D_CONSOLE /DWIN32 /D_VC80_UPGRADE=0x0710 /D_MBCS /EHsc /W3"
LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF /LTCG"
LINK_FLAGS_RELWITHDEBINFO "/LTCG"
LINK_FLAGS_MINSIZEREL "/LTCG")
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /Oi /Oy /GL /DNDEBUG /GF /MT /Gy /Zi")
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Oi /D_DEBUG /MTd /Zi")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dll.cpp") # this file doesn't use precompiled headers
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/iterhash.cpp") # this file doesn't use precompiled headers
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp") # this file is used to create precompiled headers
set_source_files_properties(${cryptopp_SOURCES} PROPERTIES
COMPILE_FLAGS "/Yu\"pch.h\"")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES
COMPILE_FLAGS "/Yc\"pch.h\"")
target_link_libraries(cryptest odbc32.lib odbccp32.lib Ws2_32.lib)
endif()

add_test(NAME CryptoppTest.BEH_FULL COMMAND $<TARGET_FILE:cryptest> v WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_AES COMMAND $<TARGET_FILE:cryptest> tv aes WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_SHA COMMAND $<TARGET_FILE:cryptest> tv sha WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PSS COMMAND $<TARGET_FILE:cryptest> tv rsa_pss WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_OAEP COMMAND $<TARGET_FILE:cryptest> tv rsa_oaep WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PKCS1_1_5 COMMAND $<TARGET_FILE:cryptest> tv rsa_pkcs1_1_5 WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)

set_property(TEST CryptoppTest.BEH_FULL PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_FULL PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_AES PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_AES PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_SHA PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_SHA PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY TIMEOUT 60)

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
Attachment (FixForMinGW.patch): text/x-diff, 2033 bytes
David Irvine | 23 May 2012 20:57
Favicon
Gravatar

Re: Can't compile crypto++ on Mac OS X Lion

Very helpful thanks a lot. We will use these changes I imagine, gotta love open source !!


Best Regards
David Irvine

On Wed, May 23, 2012 at 7:15 PM, NoRulez <norulez <at> me.com> wrote:
Thanks for your file.

There are the same errors on Mac OS X Lion.
Under windows the build also breaks with MinGW.

I've attached a patch for MinGW if your are interessted.

Best Regards

Am 23. Mai 2012 um 19:16 schrieb David Irvine <david.irvine <at> maidsafe.net>:

You could try this one of ours, it does seem to work ! not a great answer but perhaps a quick fix

David

On Wed, May 23, 2012 at 6:12 PM, NoRulez <norulez <at> me.com> wrote:
I use the following compiler flags:

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")

I've also attached the CMakeLists.txt file which I use to compile it.

Here is the output after the project is configured:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done

Best Regards


Am 23. Mai 2012 um 19:02 schrieb David Irvine <david.irvine <at> maidsafe.net>:


Compile flags and versions would really help. clang is very actively being developed just now. If you use libc++ and std=c++11 you need to make some changes. Otherwise you may be using pedantic flags or similar. 

On Wed, May 23, 2012 at 5:59 PM, NoRulez <norulez <at> me.com> wrote:
Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] /.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here


Best Regards
NoRulez


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.


--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

#==============================================================================#
# #
# Copyright (c) 2012 MaidSafe.net limited #
# #
# The following source code is property of MaidSafe.net limited and is not #
# meant for external use. The use of this code is governed by the license #
# file licence.txt found in the root directory of this project and also on #
# www.maidsafe.net. #
# #
# You are not free to copy, amend or otherwise use this source code without #
# the explicit written permission of the board of directors of MaidSafe.net. #
# #
#==============================================================================#

cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
project(Cryptopp)
enable_testing()

set(CMAKE_DEBUG_POSTFIX _d)
set(CMAKE_RELWITHDEBINFO_POSTFIX _rwdi)
set(CMAKE_MINSIZEREL_POSTFIX _msr)

if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(TEST_POSTFIX ${CMAKE_DEBUG_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(TEST_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
set(TEST_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
endif()

include(CTest)

set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
set(CTEST_CONTINUOUS_DURATION 600)
set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 10)
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY true)

file(GLOB cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

if(CMAKE_CL_64)
set(cryptopp_SOURCES ${cryptopp_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm)
add_custom_command(OUTPUT $(IntDir)x64dll.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm"
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
VERBATIM)
add_custom_command(OUTPUT $(IntDir)x64masm.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi "${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm"
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
VERBATIM)
endif()

# Not used
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eccrypto.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/eprecomp.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/cryptlib_bds.cpp")


# Set up test
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/test.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp")

set(cryptopp_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/bench.cpp
${CMAKE_CURRENT_SOURCE_DIR}/bench2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/datatest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dlltest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/fipsalgt.cpp
${CMAKE_CURRENT_SOURCE_DIR}/regtest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/validat3.cpp)

list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/bench.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/factory.h")
list(REMOVE_ITEM cryptopp_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/validate.h")

set(cryptopp_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/bench.h
${CMAKE_CURRENT_SOURCE_DIR}/factory.h
${CMAKE_CURRENT_SOURCE_DIR}/validate.h)


add_executable(cryptest ${cryptopp_TEST_SOURCES} ${cryptopp_TEST_HEADERS})

add_library(cryptopp STATIC ${cryptopp_SOURCES} ${cryptopp_HEADERS})

set_target_properties(cryptest cryptopp PROPERTIES FOLDER "Third Party/Crypto++")

add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData $<TARGET_FILE_DIR:cryptest>/TestData)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors $<TARGET_FILE_DIR:cryptest>/TestVectors)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestData ${CMAKE_BINARY_DIR}/TestData)
add_custom_command(TARGET cryptest
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors ${CMAKE_BINARY_DIR}/TestVectors)
# if(NOT MSVC)
# set_target_properties(cryptest PROPERTIES
# DEBUG_OUTPUT_NAME cryptest${CMAKE_DEBUG_POSTFIX}
# RELWITHDEBINFO_OUTPUT_NAME cryptest${CMAKE_RELWITHDEBINFO_POSTFIX}
# MINSIZEREL_OUTPUT_NAME cryptest${CMAKE_MINSIZEREL_POSTFIX})
#
# endif()

# install(TARGETS cryptopp ARCHIVE DESTINATION lib)

target_link_libraries(cryptest cryptopp)

if(UNIX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions(-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION)
set_target_properties(cryptopp cryptest PROPERTIES
COMPILE_FLAGS "-Wno-tautological-compare -fPIC -Wno-c++11-narrowing -std=c++11 -stdlib=libc++")
set_target_properties(cryptest PROPERTIES LINK_FLAGS_RELEASE "-stdlib=libc++" LINK_FLAGS "-stdlib=libc++")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe -finline-functions -std=c++11")

elseif(GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
set_target_properties(cryptopp cryptest PROPERTIES COMPILE_FLAGS "-O2 -fPIC -w -pipe -finline-functions -std=c++0x")
else()
message(FATAL "Unsupported verion of GCC, minimum 4.6 required")
endif()
endif()
elseif(MSVC)
set_target_properties(cryptopp PROPERTIES
COMPILE_FLAGS "/D_WINDOWS /DUSE_PRECOMPILED_HEADERS /DWIN32 /D_VC80_UPGRADE=0x0710 /EHsc /W3")
set_target_properties(cryptest PROPERTIES
COMPILE_FLAGS "/D_CONSOLE /DWIN32 /D_VC80_UPGRADE=0x0710 /D_MBCS /EHsc /W3"
LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF /LTCG"
LINK_FLAGS_RELWITHDEBINFO "/LTCG"
LINK_FLAGS_MINSIZEREL "/LTCG")
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /Oi /Oy /GL /DNDEBUG /GF /MT /Gy /Zi")
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Oi /D_DEBUG /MTd /Zi")
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dll.cpp") # this file doesn't use precompiled headers
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/iterhash.cpp") # this file doesn't use precompiled headers
list(REMOVE_ITEM cryptopp_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp") # this file is used to create precompiled headers
set_source_files_properties(${cryptopp_SOURCES} PROPERTIES
COMPILE_FLAGS "/Yu\"pch.h\"")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES
COMPILE_FLAGS "/Yc\"pch.h\"")
target_link_libraries(cryptest odbc32.lib odbccp32.lib Ws2_32.lib)
endif()

add_test(NAME CryptoppTest.BEH_FULL COMMAND $<TARGET_FILE:cryptest> v WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_AES COMMAND $<TARGET_FILE:cryptest> tv aes WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_SHA COMMAND $<TARGET_FILE:cryptest> tv sha WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PSS COMMAND $<TARGET_FILE:cryptest> tv rsa_pss WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_OAEP COMMAND $<TARGET_FILE:cryptest> tv rsa_oaep WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)
add_test(NAME CryptoppTest.BEH_RSA_PKCS1_1_5 COMMAND $<TARGET_FILE:cryptest> tv rsa_pkcs1_1_5 WORKING_DIRECTORY $<TARGET_FILE_DIR:cryptest>)

set_property(TEST CryptoppTest.BEH_FULL PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_FULL PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_AES PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_AES PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_SHA PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_SHA PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PSS PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_OAEP PROPERTY TIMEOUT 60)
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY LABELS Common common Behavioural CryptoPP ${CMAKE_BUILD_TYPE})
set_property(TEST CryptoppTest.BEH_RSA_PKCS1_1_5 PROPERTY TIMEOUT 60)

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
Marshall Clow | 23 May 2012 19:48
Picon

Re: Can't compile crypto++ on Mac OS X Lion

On May 23, 2012, at 9:59 AM, NoRulez wrote:

Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

I sent a patch to Wei fixing these problems a while back, but AFAIK there hasn't been a release since then.
If I recall correctly, you need to add "this->"  in front of the calls.

I'm building from svn TOT, and it works fine with clang.



Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->CheckSize

/.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
this->Equal
/.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->SetSubgroupGenerator

/.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->ExponentiateElement
/.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->SetPublicElement

/.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
this->GenerateRandom

/.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here



-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists <at> gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
David Irvine | 23 May 2012 19:52
Favicon
Gravatar

Re: Can't compile crypto++ on Mac OS X Lion

Good call Marshall I had forgotten about these errors, yes they are fixed in TOT.


On Wed, May 23, 2012 at 6:48 PM, Marshall Clow <mclow.lists <at> gmail.com> wrote:
On May 23, 2012, at 9:59 AM, NoRulez wrote:

Hello,

on windows and on linux crypto++ compiles fine.
But on mac os x lion i get compile errors.
Did i need to define something special to get it to work?

I sent a patch to Wei fixing these problems a while back, but AFAIK there hasn't been a release since then.
If I recall correctly, you need to add "this->"  in front of the calls.

I'm building from svn TOT, and it works fine with clang.



Here are the errors:
/.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] /.../source/misc.h: In instantiation of 'std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int; std::string = std::basic_string<char>]': /.../source/simple.h:42:131: required from here /.../source/misc.h:414:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] In file included from /.../source/rijndael.h:8:0, from /.../source/aes.h:4, from /.../source/dll.h:11, from /.../source/dll.cpp:6: /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:129:29: required from here /.../source/secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->CheckSize

/.../source/secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup /.../source/secblock.h:91:3: note: use 'this->CheckSize' instead /.../source/secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = short unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = short unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]': /.../source/secblock.h:130:29: required from here
/.../source/algebra.h:51:16: warning: unused parameter 'source' [-Wunused-parameter] In file included from /.../source/algebra.h:282:0, from /.../source/modarith.h:9, from /.../source/pubkey.h:35, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/algebra.cpp: In instantiation of 'const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const Element&, const Element&) const [with T = CryptoPP::Integer; CryptoPP::AbstractEuclideanDomain<T>::Element = CryptoPP::Integer]': /.../source/modarith.h:15:29: required from here /.../source/algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
this->Equal

/.../source/algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup /.../source/algebra.cpp:61:2: note: use 'this->Equal' instead In file included from /.../source/pubkey.h:36:0, from /.../source/gfpcrypt.h:8, from /.../source/dh.h:7, from /.../source/dll.h:17, from /.../source/dll.cpp:6: /.../source/filters.h: In instantiation of 'size_t CryptoPP::StringSinkTemplate<T>::Put2(const byte*, size_t, int, bool) [with T = std::basic_string<char>; size_t = long unsigned int; byte = unsigned char]': /.../source/filters.h:614:29: required from here /.../source/filters.h:597:9: warning: unused parameter 'messageEnd' [-Wunused-parameter]

/.../source/algebra.h:210:7: warning: unused parameter 'rhs' [-Wunused-parameter] In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::ECP; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::ECPPoint]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.h:46:3: error: 'SetSubgroupGenerator' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->SetSubgroupGenerator

/.../source/eccrypto.h:46:3: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:46:3: note: use 'this->SetSubgroupGenerator' instead In file included from /.../source/eccrypto.h:258:0, from /.../source/dll.h:20, from /.../source/dll.cpp:6: /.../source/eccrypto.cpp: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID&) [with EC = CryptoPP::ECP]': /.../source/eccrypto.h:263:29: required from here /.../source/eccrypto.cpp:594:101: error: 'ExponentiateElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->ExponentiateElement

/.../source/eccrypto.cpp:594:101: note: declarations in dependent base 'CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.cpp:594:101: note: use 'this->ExponentiateElement' instead In file included from /.../source/dll.h:20:0, from /.../source/dll.cpp:6: /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const EllipticCurve&, const Point&, const CryptoPP::Integer&, const CryptoPP::Integer&) [with EC = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::EllipticCurve = CryptoPP::EC2N; CryptoPP::DL_GroupParameters_EC<EC>::Point = CryptoPP::EC2NPoint]': /.../source/eccrypto.h:264:29: required from here /.../source/eccrypto.h:148:44: error: 'SetPublicElement' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

this->SetPublicElement

/.../source/eccrypto.h:148:44: note: declarations in dependent base 'CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' are not found by unqualified lookup /.../source/eccrypto.h:148:44: note: use 'this->SetPublicElement' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PublicKey_EC<EC>::Initialize(const EC&, const Element&, const CryptoPP::Integer&, const Element&) [with EC = CryptoPP::ECP; CryptoPP::DL_PublicKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:267:29: required from here /.../source/eccrypto.h:169:4: error: 'GenerateRandom' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
this->GenerateRandom

/.../source/eccrypto.h:169:4: note: declarations in dependent base 'CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >' are not found by unqualified lookup /.../source/eccrypto.h:169:4: note: use 'this->GenerateRandom' instead /.../source/eccrypto.h: In instantiation of 'void CryptoPP::DL_PrivateKey_EC<EC>::Initialize(CryptoPP::RandomNumberGenerator&, const EC&, const Element&, const CryptoPP::Integer&) [with EC = CryptoPP::ECP; CryptoPP::DL_PrivateKey_EC<EC>::Element = CryptoPP::ECPPoint]': /.../source/eccrypto.h:271:29: required from here



-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists <at> gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

Gmane