Trouble Compiling

Posted by Ombrenuit on Wed 07 Apr 2004 07:12 PM — 5 posts, 17,542 views.

#0
First off, I'd like to apologize to anyone who may find it quite irritating that they've seen the same topics over and over. However, I've spent the last 3 hours looking for a solution, and I don't have any progress to show for it. I would like to eventually find a unix host for this smaug, however, I don't have one yet. So, as a preparation I thought it would be nice to try out the codebase, and start editing it that way if I start paying for a host I can immediately let player join instead of going through a building stage. My machine is running windows XP, and I'm running cygwin as well. I have both smaug 1.4, and smaugFUSS just in case. Now, I can't get either of them to compile, even though I edited the makefiles, etc. With 1.4 I'm getting (Is there a way to copy and paste this?):

gcc -c -O -g3 -Wall -Wuninitialized -DREQUESTS -DSMAUG db.c
db.c:675:8: macro names must be identifiers
db.c: In function 'load_resets':
db.c:1579: warning: suggest explicit braces to avoid ambiguous 'else'
make[1]: *** [db.o] Error 1
make[1]: Leaving Directory ''(I don't feel like typing this one out)
make: *** [all] error 2

on FUSS I'm getting "can't find crypt.h" problems even though I edited the makefile. Any help would be greatly appreciated! Once again, I apologize for my incompetence for being unable to help myself with this issue.
Australia Forum Administrator #1
To copy the error message go to the System menu (top LH corner) and click on it. Then select Edit -> Mark, drag the mouse over the message which will highlight it, and then hit Enter. That puts it on the Clipboard.

Which SMAUG 1.4 download did you use exactly?

Are you saying you compiled it under Cygwin and got these errors? Or under Unix?

#2
I am running cygwin. I believe it was just the version I was trying to use that was giving me the problem. So, I got a different version that gave me virtually no problems, except one that probably involves cygwin.

$ make
make smaug
make[1]: Entering directory `/home/Owner/smaug/src'
rm -f smaug
gcc -lcrypt -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o b
oards.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_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o sk
ills.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o pl
anes.o imm_host.o colorize.o
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld: cannot fi
nd -lcrypt
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/Owner/smaug/src'
make: *** [all] Error 2

Is there something I need to download for cygwin to get this -lcrypt?
Canada #3
Yes, you need to download the crypt package with cygwin for it to work.
#4
I started getting undefined reference to crypt again even though I downloaded the crypt library. However, the good news is I tried out smaugfuss and it compiled perfectly, much to my delight. Thank you for the help!