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 reference to _crypt

Undefined reference to _crypt

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


Posted by Nystix   (19 posts)  Bio
Date Thu 07 Nov 2002 09:43 PM (UTC)
Message
Here is my error, I fixed the other _re_exec. Oddly enough, the code showed that everything was right in wordpad, but when I opened it up in a different program there were a couple changes... weird.

$ make
make smaug
make[1]: Entering directory `/cygdrive/h/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DNOCRYPT -DSMAUG act_comm.c
rm -f smaug
gcc -lcrypt -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_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o imm_host.o colorize.o
act_info.o: In function `do_password':
/cygdrive/h/smaug/dist/src/act_info.c:3474: undefined reference to `_crypt'
act_wiz.o: In function `do_form_password':
/cygdrive/h/smaug/dist/src/act_wiz.c:5441: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/cygdrive/h/smaug/dist/src'
make: *** [all] Error 2

Here is the pertinent section of my makefile:

NOCRYPT = -DNOCRYPT

#Uncomment the line below if you are getting implicit decleration of re_exec
#REG = -DREGEX

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

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


If anyone could shed some light, I would be eternally grateful.
Top

Posted by Nystix   (19 posts)  Bio
Date Reply #1 on Thu 07 Nov 2002 09:48 PM (UTC)
Message
NOTE TO SELF: Do not attempt to make while open makefile and necessary files are open. *slap self* Sometimes I wonder... That was my problem, I had makefile open in another program yet.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 07 Nov 2002 11:05 PM (UTC)
Message
Have you tried doing a clean make?

That is, type:

rm *.o

And then "make"

That gets rid of all object files and forces everything to be recompiled. If you don't do that, but you change the makefile, the changes might not have much effect.

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


12,118 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.