More crypt compile problem

Posted by Kenmen on Sun 08 Feb 2004 08:30 AM — 6 posts, 21,963 views.

#0
I have read all the messages on the crypt.h file. and i am still having problems on compile, when i type make it returns this

make[1]: Entering directory `/home/chris/smaugfuss/src'
gcc -c -O -g2 -Wall -lcrypt -DI3 -DI3SMAUG build.c
build.c:24:19: crypt.h: No such file or directory
build.c: In function `do_mset':
build.c:1753: warning: implicit declaration of function `crypt'
build.c:1753: warning: assignment makes pointer from integer without a cast
make[1]: *** [build.o] Error 1
make[1]: Leaving directory `/home/chris/smaugfuss/src'
make: *** [all] Error 2


i have never done anything codeing wise, i dont even know how to uncomment :) but i will send my makefile if needed
thank you
#1
Ok i tryed what i saw in another post, with creating the crypt file and adding this
char *crypt(const char *key, char *salt)
{
return (char*)key;
}

now i get the error


make smaug
make[1]: Entering directory `/home/chris/smaugfuss/src'
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG i3.c
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG act_comm.c
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG act_info.c
act_info.c:25:19: crypt.h: No such file or directory
act_info.c: In function `do_password':
act_info.c:3490: warning: implicit declaration of function `crypt'
act_info.c:3490: warning: assignment makes pointer from integer without a cast
make[1]: *** [act_info.o] Error 1
make[1]: Leaving directory `/home/chris/smaugfuss/src'
make: *** [all] Error 2

USA #2
The easy answer to your original problem isn't making your own crypt file, it's editing the make file to not try to use the crypt library in the first place. There are posts here (I'm pretty sure) or comments in the make file that can walk you thru the process. I would also recommend reading some of the more in depth threads discussing the demands and frustrations of coding and trying to run a mud. I am strongly advising you to go get a basic c or c++ book and teach yourslef at least the very basics of the language and its structure. This will make you life so very much easier in the long run and your efforts to run a mud so much less frustrating.
Amended on Sun 08 Feb 2004 10:10 AM by Meerclar
#3
I uncommented the line by taking out the # but i still get the do_password error
#4
lol i am sooooo dumb, i downloaded the crypt files for cygwin and now it compiles fine except for this

gcc -c -O -g2 -Wall -DI3 -DI3SMAUG imm_host.c
rm -f smaug
gcc -o smaug i3.o act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o color.o comm.o comments.o const.o crypt.o db.o deity.o fight.o h
andler.o hashstr.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 reset.o save.o shops.o skills.o speci
al.o tables.o track.o update.o grub.o ban.o services.o planes.o imm_host.o
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld: cannot
find -luser32
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/chris/smaugfuss/src'
make: *** [all] Error 2
$
$


and i also had a build.c error and a core dump whatever that is :)


Australia Forum Administrator #5
It cannot find the library libuser32.a - I have it in my /usr/lib/w32api directory.

As for the core dump that means the compiler crashed, for some reason.