Ok I have a problem when I try to compile SMAUG under Cygwin, and I have not been able to find this problem on any of the other subjects :)
The problem is this:
/smaugsource/save.c:191: undefined reference to 'RENAME'
/smaugsource/save.c:258: undefined reference to 'RENAME'
collect2: ld returned 1 exit status
make[1]: ***[smaug] Error 1
make[1]: Leaving directory /smaugsource
make: ***[all] Error 2
I have no idea what is even causing the problem, could I get a little help please. Incidently I downloaded the source from your page www.gammon.com.au and the compiler from www.cygwin.com I tried compiling the source straight with no modifications and I still get the same error
Before we can begin, I would need to know if what I have is what matches yours. When I compile, I have no problems with this section at all. If what you don't have doesn't match, you might have to change what you have, for what I have copy and pasted here. Hope that helps some.
I have the same problem that Dragon had pertaining to the compilation of my smaug source. The error went as follows:
************** /cygdrive/c/smaug/src
$ make
make smaug
make[1]: Entering directory `/cygdrive/c/smaug/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG save.c
save.c: In function `save_char_obj':
save.c:191: warning: implicit declaration of function `RENAME'
save.c: In function `load_char_obj':
save.c:951: warning: suggest explicit braces to avoid ambiguous `else'
rm -f smaug
gcc -lcrypt -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o bo
ards.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 ski
lls.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o pla
nes.o imm_host.o colorize.o
act_comm.o: In function `is_profane':
/cygdrive/c/smaug/src/act_comm.c:3347: undefined reference to `re_exec'
act_info.o: In function `do_hset':
/cygdrive/c/smaug/src/act_info.c:2041: undefined reference to `RENAME'
act_info.o: In function `do_password':
/cygdrive/c/smaug/src/act_info.c:3474: undefined reference to `crypt'
act_wiz.o: In function `do_balzhur':
/cygdrive/c/smaug/src/act_wiz.c:3258: undefined reference to `RENAME'
act_wiz.o: In function `do_mortalize':
/cygdrive/c/smaug/src/act_wiz.c:4880: undefined reference to `RENAME'
act_wiz.o: In function `do_form_password':
/cygdrive/c/smaug/src/act_wiz.c:5441: undefined reference to `crypt'
act_wiz.o: In function `do_destroy':
/cygdrive/c/smaug/src/act_wiz.c:5756: undefined reference to `RENAME'
/cygdrive/c/smaug/src/act_wiz.c:5784: undefined reference to `RENAME'
act_wiz.o: In function `do_pcrename':
/cygdrive/c/smaug/src/act_wiz.c:9922: undefined reference to `RENAME'
/cygdrive/c/smaug/src/act_wiz.c:9925: undefined reference to `RENAME'
build.o: In function `do_mset':
/cygdrive/c/smaug/src/build.c:1692: undefined reference to `crypt'
build.o: In function `fold_area':
/cygdrive/c/smaug/src/build.c:5889: undefined reference to `RENAME'
build.o: In function `do_installarea':
/cygdrive/c/smaug/src/build.c:6613: undefined reference to `RENAME'
comm.o: In function `nanny':
/cygdrive/c/smaug/src/comm.c:1663: undefined reference to `crypt'
/cygdrive/c/smaug/src/comm.c:1750: undefined reference to `crypt'
/cygdrive/c/smaug/src/comm.c:1771: undefined reference to `crypt'
save.o: In function `save_char_obj':
/cygdrive/c/smaug/src/save.c:191: undefined reference to `RENAME'
/cygdrive/c/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/c/smaug/src'
make: *** [all] Error 2
*************** /cygdrive/c/smaug/src
$
If you have a solution to this, let me know. I can't seem to find any errors in the code, but that is probably my own neglegence (or my non-expert programming skills).
Actually, it was my own neglegence. I went through the whole thing and all went well. For a simple solution to all compiling problems, get the smaug file smaug1.4a.tgz and make the few corrections posted in the forum compiling with cygwin. Also note, that you will need the cygwin1.dll to add to the mix and you have a working mud.
I have a compiling problem also.
I'll type make in BASH and get this:
make smaug
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
act_comm.c:40: regex.h: No such file or directory
make[1]: *** [act_comm.o] Error 1
make: *** [all] Error 2
Now, I don't know what regex.h is - it didn't come with smaug1.4a.tgz or smaug1.4a_mxp.tgz or even smaug1.4a.sce.zip... I dunno what's wrong with it all. ^.^
You can save time by searching the forum for posts which already solve your problem. In this case I searched for 'regex.h' to find the above post. (There are more).