Register forum user name Search FAQ

Gammon Forum

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 ➜ Compiling Problem

Compiling Problem

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Dragon   (8 posts)  Bio
Date Wed 19 Dec 2001 12:20 PM (UTC)

Amended on Wed 19 Dec 2001 03:25 PM (UTC) by Dragon

Message
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

Any ideas?
Top

Posted by Harsk   USA  (47 posts)  Bio
Date Reply #1 on Thu 20 Dec 2001 01:09 AM (UTC)
Message
Let's see if I can help you out here. This is what I have for your first error:

if ( IS_SET( sysdata.save_flags, SV_BACKUP ) ||
( IS_SET( sysdata.save_flags, SV_QUITBACKUP ) && quitting_char == ch ))
{
sprintf( strback,"%s%c/%s",BACKUP_DIR,tolower(ch->pcdata->filename[0]),
capitalize( ch->pcdata->filename ) );
rename( strsave, strback );
}

and for the second:

}
else
rename(TEMP_FILE, strsave);
}

re_equip_char( ch );

quitting_char = NULL;
saving_char = NULL;
return;
}

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.

Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 20 Dec 2001 01:57 AM (UTC)
Message
I can't find any reference to 'RENAME' in the SMAUG directory at all. 'rename' is there, but C is case-sensitive.

That is strange.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Robb Bowers   (2 posts)  Bio
Date Reply #3 on Sat 16 Mar 2002 03:54 AM (UTC)
Message
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).
Top

Posted by Robb Bowers   (2 posts)  Bio
Date Reply #4 on Sat 16 Mar 2002 04:22 AM (UTC)
Message
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.
Top

Posted by Jaguar385   (16 posts)  Bio
Date Reply #5 on Tue 19 Mar 2002 08:17 PM (UTC)
Message
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. ^.^

Thanks
-Jaguar
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #6 on Tue 19 Mar 2002 10:17 PM (UTC)
Message

Take a look at Compiling Error.

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).


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


21,678 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.