Quote:
Originally Posted by lollo_9_1
Are you using gcc4.7 or higher?
This is the fix to "fix" cryptopp files: [Only registered and activated users can see links. Click Here To Register...] (I fix it manually and it works very well using gcc4.8; it's a simple CheckSize to this->CheckSize, nothing else)
|
Yhanks, cipher compile,
But new error with check_server
compile check_server.cpp
g++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from ../../libserverkey/CheckServerKey.h:3:0,
from check_server.h:6,
from check_server.cpp:1:
../../libserverkey/SIM.h: In member function 'bool SIM::ParseLine(const char*)':
../../libserverkey/SIM.h:57:50: error: 'printf' was not declared in this scope
printf("invalid MAC address - mac(%s)\n", mac);
^
../../libserverkey/SIM.h:61:58: error: 'printf' was not declared in this scope
printf("IP-MAC type added - ip(%u) mac(%s)\n", ip, mac);
^
../../libserverkey/SIM.h:81:76: error: 'printf' was not declared in this scope
printf("IP RANGE type added - begin[%u] end[%u]\n", ipr.fromip, ipr.toip);
^
../../libserverkey/SIM.h:90:47: error: 'printf' was not declared in this scope
printf("single IP type added - ip(%u)\n", ip);
^
../../libserverkey/SIM.h: In member function 'bool SIM::checkmac(const char*)':
../../libserverkey/SIM.h:287:59: error: 'printf' was not declared in this scope
printf("checkmac - invalid length (%s)(%u)\n", mac, len);
^
../../libserverkey/SIM.h:302:53: error: 'printf' was not declared in this scope
printf("checkmac - cannot find '-' (%s)\n", mac);
^
../../libserverkey/SIM.h:313:65: error: 'printf' was not declared in this scope
printf("checkmac - invalid character (%s)(%c)\n", mac, mac[i]);
^
../../libserverkey/SIM.h: In member function 'bool SIM::mac2bin(const string&, unsigned char*)':
../../libserverkey/SIM.h:331:31: error: 'atoi' was not declared in this scope
unsigned char b = atoi(buf);
^
../../libserverkey/SIM.h:344:61: error: 'strtol' was not declared in this scope
unsigned char b = (unsigned char)strtol(buf, &endptr, 16);
^
../../libserverkey/SIM.h: In member function 'void SIM::bin2mac(unsigned char*, char*)':
../../libserverkey/SIM.h:356:47: error: 'snprintf' was not declared in this scope
_snprintf(outbuf + (i*3), 3, "%02X", bin[i]);
^
In file included from check_server.cpp:1:0:
check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':
check_server.h:24:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < keys_.size(); i++)
^
gmake: *** [OBJDIR/check_server.o] Error 1
My gcc:
gcc version 4.8.2 20130822 (prerelease) (FreeBSD Ports Collection)
Edit:
I add #include <stdio.h> in libserverkey/SIM.h
compile check_server.cpp
g++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from ../../libserverkey/CheckServerKey.h:3:0,
from check_server.h:6,
from check_server.cpp:1:
../../libserverkey/SIM.h: In member function 'bool SIM::mac2bin(const string&, unsigned char*)':
../../libserverkey/SIM.h:332:31: error: 'atoi' was not declared in this scope
unsigned char b = atoi(buf);
^
../../libserverkey/SIM.h:345:61: error: 'strtol' was not declared in this scope
unsigned char b = (unsigned char)strtol(buf, &endptr, 16);
^
In file included from check_server.cpp:1:0:
check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':
check_server.h:24:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < keys_.size(); i++)
^
gmake: *** [OBJDIR/check_server.o] Error 1