I am trying to compile some code from Github on my, (up to date), Centos 6.5 using GCC++.
But I get the error message below when I try to compile the code.
The line below is the one failing:
...
#define __STDC_FORMAT_MACROS 1
...
#include <inttypes.h>
...
inline std::string i64tostr(int64_t n)
{
return strprintf("%"PRId64, n); // <-- errors here.
}
...
And the error is:
error: expected ')' before 'PRId64
What could be the issue and how do I resolve it?
Edit 1: This is the line of code failing.
https://github.com/rat4/blackcoin/blob/master/src/util.h#L226
Edit 2: replacing the code with printf("%" PRId64, n); (note the extra space), as suggested in the proposed answer does not work, (the same error message is given).