C++ : Issue with linking CryptoPP library

I have a main program which needs HMAC Token to communicate with another service. For generating HMAC Token I have a wrapper class which uses CryptoPP Library (tried with version 5.6.2 and 6.0.0) to generate HMAC Token using SHA1 algorithm.

Issue : When I link wrapper library to my main program, CryptoPP is throwing errors

using g++ 4.1.2.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  libcryptopp/seckey.h:38: error: expected `>' before numeric constant
libcryptopp/seckey.h:39: error: no default argument for ‘<anonymous>’
libcryptopp/seckey.h:79: error: expected `>' before numeric constant
libcryptopp/seckey.h:83: error: ‘Q’ was not declared in this scope
libcryptopp/seckey.h:83: error: template argument 1 is invalid
libcryptopp/seckey.h:84: error: ‘Q’ was not declared in this scope
libcryptopp/seckey.h:84: error: template argument 1 is invalid
libcryptopp/seckey.h:85: error: ‘Q’ was not declared in this scope
libcryptopp/seckey.h:85: error: template argument 1 is invalid
libcryptopp/seckey.h:94: error: ‘Q’ was not declared in this scope
libcryptopp/seckey.h:95: error: ‘IV_REQ’ was not declared in this scope
libcryptopp/seckey.h:96: error: ‘IV_L’ was not declared in this scope
libcryptopp/rijndael.h:13: error: wrong number of template arguments (4, should be 3)
libcryptopp/seckey.h:80: error: provided fortemplate<unsigned int D, unsigned int N, unsigned int <anonymous> > class CryptoPP::VariableKeyLength’
libcryptopp/misc.h:51: error: creating array with negative size (‘-0x00000000000000001’)
It looks like you provide an invalid template parameter.
Topic archived. No new replies allowed.