What version of Crypto++ are you using? Try version 5.2.1 with the GCC4
patch (get it from www.cryptopp.com) or the latest code from CVS.
----- Original Message -----
From: "Jorge Marques Pelizzoni" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, November 14, 2006 3:06 AM
Subject: compiling with gcc 4.1.1 on Fedora 6
Hi, all!
I've been using Crypto++ on windows (with MSVS 2005 and cygwin, gcc 3.4.4)
with success. However, my code has also to compile on Fedora 6. When I try
to (with gcc 4.1.1), I get the template-related errors shown below. I find
those messages rather puzzling because I cannot see why a function
receiving an argument of type T would not be called with an argument of
type T&, where T is a (basic) type with copy semantics. Any ideas or
advice? Thanks in advance.
Jorge.
Here goes the output from make:
--------------------------------------------------
make -C ../cryptopp/ libcryptopp.a
make[1]: Entering directory `/root/workspace/CLS/cryptopp'
g++ -g -msse2 -pipe -c 3way.cpp
seckey.h: In function 'void CryptoPP::CheckedSetKey(T*,
CryptoPP::CipherDir, const byte*, size_t, const CryptoPP::NameValuePairs&)
[with T = CryptoPP::BlockCipherFinal<DECRYPTION,
CryptoPP::ThreeWay::Dec>]':
seckey.h:179: instantiated from 'void CryptoPP::BlockCipherFinal<DIR,
BASE>::SetKey(const byte*, size_t, const CryptoPP::NameValuePairs&) [with
CryptoPP::CipherDir DIR = DECRYPTION, BASE = CryptoPP::ThreeWay::Dec]'
3way.cpp:139: instantiated from here
seckey.h:137: error: no matching function for call to
'CryptoPP::BlockCipherFinal<DECRYPTION,
CryptoPP::ThreeWay::Dec>::UncheckedSetKey(CryptoPP::CipherDir&, const
byte*&, unsigned int)'
3way.cpp:64: note: candidates are: void
CryptoPP::ThreeWay::Base::UncheckedSetKey(CryptoPP::CipherDir, const
byte*, unsigned int, unsigned int)
seckey.h: In function 'void CryptoPP::CheckedSetKey(T*,
CryptoPP::CipherDir, const byte*, size_t, const CryptoPP::NameValuePairs&)
[with T = CryptoPP::BlockCipherFinal<ENCRYPTION,
CryptoPP::ThreeWay::Enc>]':
seckey.h:179: instantiated from 'void CryptoPP::BlockCipherFinal<DIR,
BASE>::SetKey(const byte*, size_t, const CryptoPP::NameValuePairs&) [with
CryptoPP::CipherDir DIR = ENCRYPTION, BASE = CryptoPP::ThreeWay::Enc]'
3way.cpp:139: instantiated from here
seckey.h:137: error: no matching function for call to
'CryptoPP::BlockCipherFinal<ENCRYPTION,
CryptoPP::ThreeWay::Enc>::UncheckedSetKey(CryptoPP::CipherDir&, const
byte*&, unsigned int)'
3way.cpp:64: note: candidates are: void
CryptoPP::ThreeWay::Base::UncheckedSetKey(CryptoPP::CipherDir, const
byte*, unsigned int, unsigned int)
make[1]: *** [3way.o] Error 1
make[1]: Leaving directory `/root/workspace/CLS/cryptopp'
make: *** [../cryptopp/libcryptopp.a] Error 2
----------------------