/gameserv-1.3.5$ make
g++ -Wall -g -O2 -c aClient.cpp
g++ -Wall -g -O2 -c boolean.cpp
boolean.cpp: In function 'bool passcmp(const char*, char*)':
boolean.cpp:166: warning: array subscript is above array bounds
g++ -Wall -g -O2 -c config.cpp
g++ -Wall -g -O2 -c c_forest.cpp
g++ -Wall -g -O2 -c do_admin.cpp
g++ -Wall -g -O2 -c do_attack.cpp
do_attack.cpp: In function 'void do_attack(char*)':
do_attack.cpp:58: error: 'rand' was not declared in this scope
do_attack.cpp:69: error: 'rand' was not declared in this scope
do_attack.cpp:76: error: 'rand' was not declared in this scope
make: *** Error 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-12-10
Add
`#include <cstdlib>`
to the header info for do_attack.cpp and player.cpp (its because of the g++ <4.3 libraries)
Add
`#include <cstring>`
to do_help.cpp and news.cpp. Add both to strings.cpp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Better yet, add them to "extern.h", however now i get this error:
tcpclient.cpp: In function ‘int daemon(int, int)’:
tcpclient.cpp:813: error: declaration of ‘int daemon(int, int)’ throws different exceptions
tcpclient.cpp:57: error: from previous declaration ‘int daemon(int, int) throw ()’
tcpclient.cpp: In function ‘int daemon(int, int)’:
tcpclient.cpp:845: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result
tcpclient.cpp:851: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result
tcpclient.cpp:851: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result
make: *** Error 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This does not work with the current version of gameserv with the bugfix. I am using the current version of centos. Please advise me what I can do in order to compile the current version of gameserv please??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
make
g++ -Wall -g -O2 -c do_attack.cpp
do_attack.cpp: In function ‘void do_attack(char)’:
do_attack.cpp:58: error: ‘rand’ was not declared in this scope
do_attack.cpp:69: error: ‘rand’ was not declared in this scope
do_attack.cpp:76: error: ‘rand’ was not declared in this scope
make: ** [do_attack.o] Error 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
/gameserv-1.3.5$ make
g++ -Wall -g -O2 -c aClient.cpp
g++ -Wall -g -O2 -c boolean.cpp
boolean.cpp: In function 'bool passcmp(const char*, char*)':
boolean.cpp:166: warning: array subscript is above array bounds
g++ -Wall -g -O2 -c config.cpp
g++ -Wall -g -O2 -c c_forest.cpp
g++ -Wall -g -O2 -c do_admin.cpp
g++ -Wall -g -O2 -c do_attack.cpp
do_attack.cpp: In function 'void do_attack(char*)':
do_attack.cpp:58: error: 'rand' was not declared in this scope
do_attack.cpp:69: error: 'rand' was not declared in this scope
do_attack.cpp:76: error: 'rand' was not declared in this scope
make: *** Error 1
Add
`#include <cstdlib>`
to the header info for do_attack.cpp and player.cpp (its because of the g++ <4.3 libraries)
Add
`#include <cstring>`
to do_help.cpp and news.cpp. Add both to strings.cpp
Better yet, add them to "extern.h", however now i get this error:
tcpclient.cpp: In function ‘int daemon(int, int)’:
tcpclient.cpp:813: error: declaration of ‘int daemon(int, int)’ throws different exceptions
tcpclient.cpp:57: error: from previous declaration ‘int daemon(int, int) throw ()’
tcpclient.cpp: In function ‘int daemon(int, int)’:
tcpclient.cpp:845: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result
tcpclient.cpp:851: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result
tcpclient.cpp:851: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result
make: *** Error 1
ok i commented out line 57 in tcpclient.cpp:
// Make this a daemon
//int daemon(int nochdir, int noclose);
It then compiled with no errors..
This does not work with the current version of gameserv with the bugfix. I am using the current version of centos. Please advise me what I can do in order to compile the current version of gameserv please??
This is the error I am getting
make
g++ -Wall -g -O2 -c do_attack.cpp
do_attack.cpp: In function ‘void do_attack(char)’:
do_attack.cpp:58: error: ‘rand’ was not declared in this scope
do_attack.cpp:69: error: ‘rand’ was not declared in this scope
do_attack.cpp:76: error: ‘rand’ was not declared in this scope
make: ** [do_attack.o] Error 1