I had Crypto++ library v.5.6.2 in one of my projects. It used to compile (as a static .lib
) very cleanly.
Now I see the need to upgrade to the latest available version 6.1.0 with Visual Studio 2008, but when I tried to compile it gave me 63 warning messages listed below.
I know those are just warnings and many people ignore them. I personally do not.
So I was wondering if there's a resolution for those?
Building and assembling rdrand.asm
Assembling: c:\Users\User\C++\cryptopp610\rdrand.asm
Performing Custom Build Step
1 file(s) copied.
Compiling...
pch.cpp
c:\users\User\c++\cryptopp610\cryptlib.h(1318) : warning C4505: 'CryptoPP::AuthenticatedSymmetricCipher::AlgorithmName' : unreferenced local function has been removed
Compiling...
vmac.cpp
twofish.cpp
ttmac.cpp
trdlocal.cpp
tigertab.cpp
tiger.cpp
tftables.cpp
tea.cpp
strciphr.cpp
squaretb.cpp
square.cpp
sosemanuk.cpp
socketft.cpp
c:\users\User\c++\cryptopp610\socketft.h(197) : warning C4355: 'this' : used in base member initializer list
c:\users\User\c++\cryptopp610\socketft.h(213) : warning C4355: 'this' : used in base member initializer list
skipjack.cpp
simple.cpp
sharkbox.cpp
shark.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
shacal2.cpp
sha3.cpp
sha.cpp
Compiling...
serpent.cpp
seed.cpp
seal.cpp
salsa.cpp
safer.cpp
rw.cpp
rsa.cpp
c:\users\User\c++\cryptopp610\oaep.h(50) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
rng.cpp
ripemd.cpp
rijndael.cpp
rdtables.cpp
rdrand.cpp
rc6.cpp
rc5.cpp
rc2.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
randpool.cpp
rabin.cpp
c:\users\User\c++\cryptopp610\oaep.h(50) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
queue.cpp
pubkey.cpp
pssr.cpp
Compiling...
polynomi.cpp
poly1305.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
pkcspad.cpp
panama.cpp
osrng.cpp
c:\users\User\c++\cryptopp610\osrng.h(256) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
oaep.cpp
c:\users\User\c++\cryptopp610\oaep.h(50) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
network.cpp
nbtheory.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
mqv.cpp
mqueue.cpp
modes.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
misc.cpp
md5.cpp
md4.cpp
md2.cpp
marss.cpp
mars.cpp
luc.cpp
c:\users\User\c++\cryptopp610\oaep.h(50) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\dh.h(169) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
keccak.cpp
integer.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
Compiling...
idea.cpp
ida.cpp
c:\users\User\c++\cryptopp610\ida.h(73) : warning C4355: 'this' : used in base member initializer list
c:\users\User\c++\cryptopp610\ida.h(121) : warning C4355: 'this' : used in base member initializer list
hrtimer.cpp
hmac.cpp
hex.cpp
gzip.cpp
gost.cpp
gfpcrypt.cpp
gf2n.cpp
gf2_32.cpp
gf256.cpp
gcm.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
fipstest.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\dh.h(169) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\ecpoint.h(49) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\ecpoint.h(82) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\osrng.h(256) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\oaep.h(50) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
fips140.cpp
filters.cpp
files.cpp
esign.cpp
emsa2.cpp
elgamal.cpp
ecp.cpp
c:\users\User\c++\cryptopp610\ecpoint.h(49) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\ecpoint.h(82) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
Compiling...
ec2n.cpp
c:\users\User\c++\cryptopp610\ecpoint.h(49) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\ecpoint.h(82) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
eax.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
dsa.cpp
dh2.cpp
dh.cpp
c:\users\User\c++\cryptopp610\dh.h(169) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
dessp.cpp
des.cpp
default.cpp
cryptlib.cpp
c:\users\User\c++\cryptopp610\osrng.h(256) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
crc.cpp
cpu.cpp
cmac.cpp
channels.cpp
chacha.cpp
ccm.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
cbcmac.cpp
casts.cpp
cast.cpp
camellia.cpp
blumshub.cpp
Compiling...
blowfish.cpp
blake2.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
bfinit.cpp
basecode.cpp
base64.cpp
base32.cpp
authenc.cpp
asn.cpp
arc4.cpp
algparam.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
algebra.cpp
adler32.cpp
Compiling...
3way.cpp
zlib.cpp
zinflate.cpp
zdeflate.cpp
xtrcrypt.cpp
xtr.cpp
c:\users\User\c++\cryptopp610\algparam.h(409) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(410) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
c:\users\User\c++\cryptopp610\algparam.h(411) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
winpipes.cpp
whrlpool.cpp
wake.cpp
wait.cpp
Compiling...
iterhash.cpp
c:\users\User\c++\cryptopp610\cryptlib.h(1318) : warning C4505: 'CryptoPP::AuthenticatedSymmetricCipher::AlgorithmName' : unreferenced local function has been removed
dll.cpp
c:\users\User\c++\cryptopp610\cryptlib.h(1318) : warning C4505: 'CryptoPP::AuthenticatedSymmetricCipher::AlgorithmName' : unreferenced local function has been removed
Creating library...
Results
Build log was saved at "file://c:\Users\User\C++\cryptopp610\Win32\cryptlib\Debug\BuildLog.htm"
cryptlib - 0 error(s), 63 warning(s)
EDIT: Here's one of those warning C4355: 'this' : used in base member initializer list
where m_sender
is being initialized in constructor:
/// socket-based implementation of NetworkSink
class SocketSink : public NetworkSink, public Socket
{
public:
SocketSink(socket_t s=INVALID_SOCKET, unsigned int maxBufferSize=0, unsigned int autoFlushBound=16*1024)
: NetworkSink(maxBufferSize, autoFlushBound), Socket(s), m_sender(*this) {}
void SendEof() {ShutDown(SD_SEND);}
private:
NetworkSender & AccessSender() {return m_sender;}
SocketSender m_sender;
};
Although while trying to correct it by doing this:
class SocketSink : public NetworkSink, public Socket
{
public:
SocketSink(socket_t s=INVALID_SOCKET, unsigned int maxBufferSize=0, unsigned int autoFlushBound=16*1024)
: NetworkSink(maxBufferSize, autoFlushBound), Socket(s)
{
m_sender = *this;
}
void SendEof() {ShutDown(SD_SEND);}
private:
NetworkSender & AccessSender() {return m_sender;}
SocketSender m_sender;
};
I get this error. But I'm not really that familiar with this library to make an assignment constructor myself:
error C2512: 'CryptoPP::SocketSender' : no appropriate default constructor available
error C2582: 'operator =' function is unavailable in 'CryptoPP::SocketSender'
So yeah, if anyone familiar with Crypto++ can help me with those, I'd appreciate it. There's too many bugs like this.