I compiled and built
Crypto++ Library 5.6.3 no problem !I compiled and ran examples Serpent GCM, Twofish EAX no problem !
but, i failed to compile cryptopp-authenc.cpp
I'm using
g++ (SUSE Linux) 5.2.1 20150721 [gcc-5-branch revision 226027]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
here the compile error:
g++ -g -O2 -DNDEBUG -I/usr/include/cryptopp cryptopp-authenc.cpp -o test -lcryptopp -lpthread
In file included from cryptopp-authenc.cpp:20:0:
/usr/include/cryptopp/secblock.h: In instantiation of ‘CryptoPP::SecBlock<T, A> CryptoPP::SecBlock<T, A>::operator+(const CryptoPP::SecBlock<T, A>&) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>]’:
cryptopp-authenc.cpp:156:114: required from here
/usr/include/cryptopp/secblock.h:593:6: error: cannot convert ‘CryptoPP::SecBlock<T, A>::size<unsigned char, CryptoPP::AllocatorWithCleanup<unsigned char> >’ from type ‘CryptoPP::SecBlock<unsigned char>::size_type (CryptoPP::SecBlock<unsigned char>::)() const {aka long unsigned int (CryptoPP::SecBlock<unsigned char>::)() const}’ to type ‘bool’
if(!t.size) return SecBlock(*this);
^
/usr/include/cryptopp/secblock.h:593:6: error: in argument to unary !
Any idea?