Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ compiler error - please help
compiler error - please help
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Sat 13 Oct 2007 10:07 PM (UTC) Amended on Sat 13 Oct 2007 10:12 PM (UTC) by Nargsbrood
|
Message
| it's been about a year since i've looked at my code here. apparently when I left the project last year, i left it with compiler errors and am having problems determining what the cause is and how to fix it.
any direction on how to solve this problem would be greatly appreciated. let me know if any other bits of info are needed. Thank you - Nargs
smaug 1.4 - compiled on cygwin
here is what I am getting when I make all:
$ make all
make smaug
make[1]: Entering directory `/cygdrive/d/smaug/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
In file included from act_comm.c:32:
mud.h:2291: error: parse error before "MOBF_INDEX_DATA"
mud.h:2291: warning: no semicolon at end of struct or union
mud.h:2342: warning: built-in function 'exp' declared as non-function
mud.h:2419: error: parse error before '}' token
mud.h:4688: error: 'act' redeclared as different kind of symbol
mud.h:2343: error: previous declaration of 'act' was here
act_comm.c: In function `drunk_speech':
act_comm.c:229: error: dereferencing pointer to incomplete type
act_comm.c:229: error: dereferencing pointer to incomplete type
act_comm.c:231: error: dereferencing pointer to incomplete type
act_comm.c: In function `talk_channel':
act_comm.c:375: error: dereferencing pointer to incomplete type
act_comm.c:382: error: dereferencing pointer to incomplete
and those "error: dereferencing pointer to incomplete " keep repeating over and over many many pages long. Those problems will probably be fixed once my main problem is rooted out. which apparently is in mud.h
mud.h extract:
2288 MPROG_ACT_LIST * mpact;
2289 int mpactnum;
2290 sh_int mpscriptpos;
2291 MOBF_INDEX_DATA * pIndexData;
2292 DESCRIPTOR_DATA * desc;
2293 AFFECT_DATA * first_affect;
2294 AFFECT_DATA * last_affect;
| Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Sat 13 Oct 2007 10:19 PM (UTC) |
Message
| Is 'MOBF_INDEX_DATA' a typo for 'MOB_INDEX_DATA'? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Reply #2 on Sat 13 Oct 2007 10:31 PM (UTC) |
Message
| wow - that was an easy one for you and now i feel sheepish. lol, thanks :) | Top |
|
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Reply #3 on Sat 13 Oct 2007 11:12 PM (UTC) |
Message
| i fixed that last error and am now getting a legion of new problems :(
is there one single thing i should look for or one thing that would fix the problem? I would not have made this many changes without testing.
$ make
make smaug
make[1]: Entering directory `/cygdrive/d/smaug/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
act_comm.c: In function `is_profane':
act_comm.c:3347: warning: implicit declaration of function `re_exec'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_info.c
act_info.c: In function `do_hset':
act_info.c:2062: warning: implicit declaration of function `RENAME'
act_info.c: In function `do_password':
act_info.c:3522: warning: implicit declaration of function `crypt'
act_info.c:3522: warning: assignment makes pointer from integer without a cast
act_info.c: In function `do_classes':
act_info.c:4781: warning: operation on `tClass_temp' may be undefined
act_info.c: In function `do_races':
act_info.c:4802: warning: operation on `tRace_temp' may be undefined
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_move.c
act_move.c:393:15: warning: trigraph ??> ignored, use -trigraphs to enable
act_move.c: In function `will_fall':
act_move.c:495: warning: suggest parentheses around && within ||
act_move.c: In function `generate_exit':
act_move.c:604: warning: use of cast expressions as lvalues is deprecated
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_obj.c
act_obj.c: In function `can_layer':
act_obj.c:1389: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c: In function `do_auction':
act_obj.c:2651: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c:2675: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_wiz.c
act_wiz.c:1637:22: warning: trigraph ??! ignored, use -trigraphs to enable
act_wiz.c: In function `do_balzhur':
act_wiz.c:3268: warning: implicit declaration of function `RENAME'
act_wiz.c: In function `do_form_password':
act_wiz.c:5452: warning: implicit declaration of function `crypt'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG boards.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG build.c
build.c: In function `do_mset':
build.c:1735: warning: implicit declaration of function `crypt'
build.c:1735: warning: assignment makes pointer from integer without a cast
build.c: In function `fold_area':
| Top |
|
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Reply #4 on Sat 13 Oct 2007 11:13 PM (UTC) |
Message
| build.c:5941: warning: implicit declaration of function `RENAME'
build.c:6110: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6113: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6116: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6122: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6127: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6130: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG clans.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
comm.c: In function `nanny':
comm.c:1663: warning: implicit declaration of function `crypt'
comm.c:1663: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
comm.c:1750: warning: assignment makes pointer from integer without a cast
comm.c:1771: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comments.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG const.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG db.c
db.c: In function `load_resets':
db.c:1658: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG deity.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG fight.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG handler.c
handler.c: In function `get_eq_char':
handler.c:1335: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG hashstr.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG ibuild.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG ident.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG interp.c
interp.c: In function `interpret':
interp.c:757: warning: int format, time_t arg (arg 7)
interp.c:757: warning: int format, suseconds_t arg (arg 8)
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG magic.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG makeobjs.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG mapout.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG misc.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG mpxset.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG mud_comm.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG mud_prog.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG player.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG polymorph.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG requests.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG reset.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG save.c
save.c: In function `save_char_obj':
| Top |
|
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Reply #5 on Sat 13 Oct 2007 11:13 PM (UTC) |
Message
| save.c:191: warning: implicit declaration of function `RENAME'
save.c: In function `load_char_obj':
save.c:961: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG shops.c
shops.c: In function `appraise_all':
shops.c:1090: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG skills.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG special.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG tables.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG track.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG update.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG grub.c
grub.c:23: warning: conflicting types for built-in function 'trunc'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG stat_obj.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG ban.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG services.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG planes.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG imm_host.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG colorize.c
colorize.c: In function `load_colors':
colorize.c:39: warning: implicit declaration of function `strcpy'
rm -f smaug
gcc -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o hashstr
.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o mud_com
m.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o s
pecial.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o i
mm_host.o colorize.o
act_comm.o: In function `is_profane':
/cygdrive/d/smaug/src/act_comm.c:3347: undefined reference to `_re_exec'
act_info.o: In function `do_hset':
/cygdrive/d/smaug/src/act_info.c:2062: undefined reference to `_RENAME'
act_info.o: In function `do_password':
/cygdrive/d/smaug/src/act_info.c:3522: undefined reference to `_crypt'
act_wiz.o: In function `do_balzhur':
/cygdrive/d/smaug/src/act_wiz.c:3268: undefined reference to `_RENAME'
act_wiz.o: In function `do_mortalize':
/cygdrive/d/smaug/src/act_wiz.c:4890: undefined reference to `_RENAME'
act_wiz.o: In function `do_form_password':
/cygdrive/d/smaug/src/act_wiz.c:5451: undefined reference to `_crypt'
act_wiz.o: In function `do_destroy':
/cygdrive/d/smaug/src/act_wiz.c:5766: undefined reference to `_RENAME'
/cygdrive/d/smaug/src/act_wiz.c:5794: undefined reference to `_RENAME'
act_wiz.o: In function `do_pcrename':
/cygdrive/d/smaug/src/act_wiz.c:9932: undefined reference to `_RENAME'
/cygdrive/d/smaug/src/act_wiz.c:9935: undefined reference to `_RENAME'
build.o: In function `do_mset':
/cygdrive/d/smaug/src/build.c:1735: undefined reference to `_crypt'
build.o: In function `fold_area':
/cygdrive/d/smaug/src/build.c:5941: undefined reference to `_RENAME'
build.o: In function `do_installarea':
/cygdrive/d/smaug/src/build.c:6665: undefined reference to `_RENAME'
comm.o: In function `nanny':
/cygdrive/d/smaug/src/comm.c:1663: undefined reference to `_crypt'
/cygdrive/d/smaug/src/comm.c:1750: undefined reference to `_crypt'
/cygdrive/d/smaug/src/comm.c:1771: undefined reference to `_crypt'
save.o: In function `save_char_obj':
/cygdrive/d/smaug/src/save.c:191: undefined reference to `_RENAME'
/cygdrive/d/smaug/src/save.c:258: undefined reference to `_RENAME'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/cygdrive/d/smaug/src'
make: *** [all] Error 2 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #6 on Sun 14 Oct 2007 12:01 AM (UTC) |
Message
| They seem to be mainly warnings, I think the compiler warnings have been improved.
You have about 3 main errors I can see, re_exec (I think that is called in one place and can be removed - search the forum for that).
Similarly for crypt, search the forum.
I am not sure about RENAME, but I would look at where it is defined, maybe that can be spelt differently or something. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nargsbrood
(54 posts) Bio
|
Date
| Reply #7 on Sun 14 Oct 2007 01:01 AM (UTC) Amended on Sun 14 Oct 2007 01:16 AM (UTC) by Nargsbrood
|
Message
| i uncommented the appropriate 2 lines in makefile but still get the same errors.
what i dont understand is i have 2 versions of my code.
the 1st version - wont compile due to errors noted above.
2nd version - backup version of the 1st version. probably month before 1st version current state.
2nd version compiles cleanly - no warnings whatsover about ambiguous else if whatevers and nothing about regex rename or crypt references.
why would one report the else if ambiguous problems and the other not if they're using same compiler? the code it gives the warnings on is not my code. in one place its auction code and i've never messed with that in my life.
Why isnt it consistent? and any other ideas on the crypt regex thing? | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
19,135 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top