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' error

Undefined reference to '_crypt' error

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


Posted by Theheahi   (23 posts)  Bio
Date Fri 02 May 2008 06:00 PM (UTC)
Message
hi again, in other thread i couldn't solve my problem so im making a new thread about my question.when i try to compile smaug 1.8b i get same error

build.c:1822:Undefined reference to '_crypt' error

however i search and tried everything which i found on that forum still same error. please help.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 02 May 2008 09:26 PM (UTC)

Amended on Fri 02 May 2008 09:27 PM (UTC) by Nick Gammon

Message
I downloaded smaug1.8b.tgz and compiled it under Cygwin. I had to make two changes to make it work:

Change the start of the Makefile to read:


CC      = gcc
#PROF    = -p
NOCRYPT = -DNOCRYPT

# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket



Note the change to the 3rd line.

Now if you compile you will get an error about missing _re_exec. Edit the file act_comm.c and at the very end change the is_profane function to be:


int is_profane (char *what)
{
 return(0);
}


Now it should compile and link OK.

- Nick Gammon

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

Posted by Theheahi   (23 posts)  Bio
Date Reply #2 on Fri 02 May 2008 10:54 PM (UTC)
Message
can you upload your edited version please, cause i try to fix but counl't.
Top

Posted by Theheahi   (23 posts)  Bio
Date Reply #3 on Fri 02 May 2008 11:14 PM (UTC)

Amended on Fri 02 May 2008 11:16 PM (UTC) by Theheahi

Message
aha, ok now i can commpile thanks for help.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Sat 03 May 2008 12:15 AM (UTC)
Message
What was the problem? Sharing will help future people solve this if they get the same issue.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Theheahi   (23 posts)  Bio
Date Reply #5 on Sat 03 May 2008 12:21 AM (UTC)
Message
just do what nick did, it solves _crypt and _re_exec error while compiling.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Sat 03 May 2008 12:24 AM (UTC)
Message
I thought that is exactly what we already said to do several times in previous threads... :P You said you'd done it but it didn't work, do you know what was different this time?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #7 on Sat 03 May 2008 01:50 AM (UTC)

Amended on Sat 03 May 2008 01:51 AM (UTC) by Nick Gammon

Message
Previously he said he had: "uncomment NEED_CRYPT = -lcrypt".

This is different. The Makefile does not actually say what to do with the "NOCRYPT" line. It originally had:


NOCRYPT = 


There were no comments suggesting what to replace that with.

The "NEED_CRYPT = -lcrypt" change solves a linking problem, the other changes solve a compiling problem.

I am pretty sure this is covered in the forum here previously, but in our replies to him we didn't mention that.

- Nick Gammon

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

Posted by Theheahi   (23 posts)  Bio
Date Reply #8 on Sat 03 May 2008 12:55 PM (UTC)
Message
yes, as nick told all the times before we only try to uncomment but there was an empty line

NOCRYPT =

add end of that line "-DNOCRYPT"

NOCRYPT = -DNOCRYPT

is the right one, and works fine.
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,947 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.