Issues Compiling
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 22, 2012 10:20 am
Last edited Jan 22, 2012 10:21 am by dextermovies
Fledgling
GroupMembers
Posts27
JoinedSep 10, 2005
When I go to compile afkmud 2.1.5 on cygwin. I am using all the packages it says to on the post then some. I have tried using just the packages and still get the same issue.
Here are the errors I get
Thank you guys for making a great mud base, have used it before in the past. But any help here is greatly appreciated.
Here are the errors I get
calendar.cpp: In function ‘char* c_time(time_t, int)’: calendar.cpp:144:29: error: ‘timezone’ was not declared in this scope calendar.cpp:157:32: error: ‘localtime’ was not declared in this scope calendar.cpp:160:30: error: ‘tzname’ was not declared in this scope calendar.cpp:160:42: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:166:23: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:166:46: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:166:62: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:166:78: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:19: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:46: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:68: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:90: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:106: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:121: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:167:136: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp: In function ‘char* mini_c_time(time_t, int)’: calendar.cpp:185:29: error: ‘timezone’ was not declared in this scope calendar.cpp:198:32: error: ‘localtime’ was not declared in this scope calendar.cpp:201:30: error: ‘tzname’ was not declared in this scope calendar.cpp:201:42: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:206:20: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:210:63: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:210:82: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:19: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:46: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:68: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:90: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:106: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ calendar.cpp:211:121: error: invalid use of incomplete type ‘struct tm’ /usr/include/wchar.h:46:8: error: forward declaration of ‘struct tm’ Makefile:169: recipe for target `o/calendar.o' failed make[1]: *** [o/calendar.o] Error 1 make[1]: *** Waiting for unfinished jobs.... Makefile:106: recipe for target `all' failed make: *** [all] Error 2
Thank you guys for making a great mud base, have used it before in the past. But any help here is greatly appreciated.
#2 Jan 27, 2012 10:03 am
Fledgling
GroupMembers
Posts1
JoinedJan 27, 2012
To fix this in cygwin, I added the following in the include section of the files calender.cpp, connhist.cpp, and mud_comm.cpp:
#include "time.h"
#3 Mar 12, 2012 3:58 pm
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010
I recently have been trying to port afkmud over to cygwin. Ran into a similar error.
Building AFKMud....
/usr/bin/make -j2 -s afkmud
Compiling o/act_comm.o....
Compiling o/act_wiz.o....
Compiling o/area.o....
Compiling o/auction.o....
Compiling o/builder.o....
Compiling o/character.o....
Compiling o/clans.o....
Compiling o/comm.o....
Compiling o/commands.o....
commands.cpp: In function ‘void start_timer(timeval*)’:
commands.cpp:180:34: error: ‘gettimeofday’ was not declared in this scope
commands.cpp: In function ‘time_t end_timer(timeval*)’:
commands.cpp:186:19: error: aggregate ‘timeval etime’ has incomplete type and cannot be defined
commands.cpp:191:31: error: ‘gettimeofday’ was not declared in this scope
commands.cpp:192:34: error: invalid use of incomplete type ‘struct timeval’
commands.cpp:62:29: error: forward declaration of ‘struct timeval’
commands.cpp:192:56: error: invalid use of incomplete type ‘struct timeval’
commands.cpp:62:29: error: forward declaration of ‘struct timeval’
commands.cpp: In function ‘void interpret(char_data*, std::string)’:
commands.cpp:456:19: error: aggregate ‘timeval time_used’ has incomplete type and cannot be defined
commands.cpp: In function ‘void do_timecmd(char_data*, std::string)’:
commands.cpp:1914:19: error: aggregate ‘timeval starttime’ has incomplete type and cannot be defined
commands.cpp:1915:19: error: aggregate ‘timeval endtime’ has incomplete type and cannot be defined
commands.cpp:1942:35: error: ‘gettimeofday’ was not declared in this scope
commands.cpp: In function ‘time_t end_timer(timeval*)’:
commands.cpp:203:1: warning: control reaches end of non-void function
make[1]: *** [o/commands.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:169: recipe for target `o/commands.o' failed
Makefile:106: recipe for target `all' failed
make: *** [all] Error 2
BUILD FAILED (exit value 2, total time: 18s)
any help?
Building AFKMud....
/usr/bin/make -j2 -s afkmud
Compiling o/act_comm.o....
Compiling o/act_wiz.o....
Compiling o/area.o....
Compiling o/auction.o....
Compiling o/builder.o....
Compiling o/character.o....
Compiling o/clans.o....
Compiling o/comm.o....
Compiling o/commands.o....
commands.cpp: In function ‘void start_timer(timeval*)’:
commands.cpp:180:34: error: ‘gettimeofday’ was not declared in this scope
commands.cpp: In function ‘time_t end_timer(timeval*)’:
commands.cpp:186:19: error: aggregate ‘timeval etime’ has incomplete type and cannot be defined
commands.cpp:191:31: error: ‘gettimeofday’ was not declared in this scope
commands.cpp:192:34: error: invalid use of incomplete type ‘struct timeval’
commands.cpp:62:29: error: forward declaration of ‘struct timeval’
commands.cpp:192:56: error: invalid use of incomplete type ‘struct timeval’
commands.cpp:62:29: error: forward declaration of ‘struct timeval’
commands.cpp: In function ‘void interpret(char_data*, std::string)’:
commands.cpp:456:19: error: aggregate ‘timeval time_used’ has incomplete type and cannot be defined
commands.cpp: In function ‘void do_timecmd(char_data*, std::string)’:
commands.cpp:1914:19: error: aggregate ‘timeval starttime’ has incomplete type and cannot be defined
commands.cpp:1915:19: error: aggregate ‘timeval endtime’ has incomplete type and cannot be defined
commands.cpp:1942:35: error: ‘gettimeofday’ was not declared in this scope
commands.cpp: In function ‘time_t end_timer(timeval*)’:
commands.cpp:203:1: warning: control reaches end of non-void function
make[1]: *** [o/commands.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:169: recipe for target `o/commands.o' failed
Makefile:106: recipe for target `all' failed
make: *** [all] Error 2
BUILD FAILED (exit value 2, total time: 18s)
any help?
#4 Mar 12, 2012 4:42 pm
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003
Did you try the above recommendation, including time.h?
#5 Mar 13, 2012 6:36 am
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010
time.h was already included
#6 Mar 13, 2012 8:37 am
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010
it needed to be #include
Fixed!
Fixed!
Pages:<< prev 1 next >>