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 ➜ Undefined references

Undefined references

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


Posted by Cyldor   USA  (13 posts)  Bio
Date Sat 25 May 2002 08:07 PM (UTC)
Message
I just pulled the smaug src off this site, attempted to compile, and this is what is thrown at me.
Quote:

************** /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


I noticed this was mentioned earler, but never was given a solution. Anybody have any clues on this? Also, I am not a coder...yet.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 26 May 2002 02:11 AM (UTC)
Message
Which source did you get - which filename exactly? The latest one doesn't seem to have any reference to RENAME in it.

- Nick Gammon

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

Posted by Cyldor   USA  (13 posts)  Bio
Date Reply #2 on Sun 26 May 2002 02:13 AM (UTC)

Amended on Sun 26 May 2002 02:21 AM (UTC) by Cyldor

Message
http://www.gammon.com.au/files/smaug/smaug1.4a.sce.zip - 814 Kb - Source (only) for SMAUG server v 1.4a for Win32

Straight out of your downloads section. And I got it out today.
Top

Posted by Cyldor   USA  (13 posts)  Bio
Date Reply #3 on Sun 26 May 2002 03:12 AM (UTC)

Amended on Sun 26 May 2002 05:46 AM (UTC) by Cyldor

Message
Took me a couple seconds of thinking, but I got it.

In the makefile, there are two lines commented.

#Uncomment the line below if you are getting undefined re_exec errors
#NEED_REG = -lgnuregex

#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt

Uncomment them and its done. I belive crypt and rename are linked together. I got some more errors after this, but I post them tomorrow.
Top

Posted by Cyldor   USA  (13 posts)  Bio
Date Reply #4 on Sun 26 May 2002 06:11 AM (UTC)
Message
ok, I lied. It came back when I compiled again....no other changes. Renames are gone, but crypt still stands.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 27 May 2002 01:05 AM (UTC)
Message
Crypt is used for password encryption. You can probably manage without it. Search for crypt on this forum, I'm sure we've been over this ground before. :)

- Nick Gammon

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

Posted by Cyldor   USA  (13 posts)  Bio
Date Reply #6 on Thu 30 May 2002 08:41 PM (UTC)
Message
Nope, never have, but I fixed the error. heres the solution

Make a crypt.c in your src. In crypt.c add

char *crypt(const char *key, char *salt)
{
return (char*)key;
}

In your makefile, add crypt.c and crypt.o in the proper places. Also uncomment this line.

NEED_CRYPT = -lcrypt

For rename

In misc.h

// to emulate Unix rename - we must delete the newpath first
int RENAME (const char * oldpath, const char * newpath)
{
remove (newpath);
return rename (oldpath, newpath);
}

What you need to do is add this below it:

#else

int RENAME( const char *oldpath, const char *newpath )
{
return rename( oldpath, newpath );
}

that should fix the rname/crypt errors. Hope this pice of info helps some out
Top

Posted by Vermithrax   USA  (11 posts)  Bio
Date Reply #7 on Thu 30 May 2002 09:39 PM (UTC)
Message
I dunno... That *will* work, but it will also not encrypt the passwords in any way. I'd recommend download libcrypt, compiling it, and installing it on the system. That'd probably be a bit more secure. :)
Top

Posted by Cyldor   USA  (13 posts)  Bio
Date Reply #8 on Fri 31 May 2002 03:24 AM (UTC)
Message
Blah, who cares? If it works, it works ;)
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.


30,184 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.