--- Jason Snuggs <[EMAIL PROTECTED]> wrote:
> g++ is the compiler in redhat 7.0
> 
> I tried the library -lcrypt at the end, beginning and middle of the linker.
> I tried removing the definition from the makefile and including unistd.h
> since that's what the manfile said the function existed in.
> Tried pointing to /lib/lcrypt.a (or something like this)
> And a bunch of other little stuff that I don't remember, but did me no good
> :)
> 
> 
> Here's the make message and errors, they're basically the ones right out of
> the FAQ and all the other posts people have when first starting ROM and don't
> have the lcrypt option set, but I do have it set:
> 
> g++ -O -g -ggdb -pthread -lz -o sot act_comm.o act_enter.o act_info.o
> act_move.o act_obj.o act_skills.o act_wiz.o alias.o ban.o comm.o const.o db.o
> db2.o effects.o fight.o handler.o healer.o interp.o lookup.o magic.o magic2.o
> music.o recycle.o save.o skills.o special.o tables.o update.o mob_cmds.o
> mob_prog.o olc.o olc_act.o olc_save.o bit.o mem.o string.o olc_mpcode.o
> hedit.o guild_skills.o quest.o bank.o pipe.o note.o auction.o kyt.o
> rdns_cache.o mkwSys.o roleprize.o hunt.o fight_bow.o bitsys.o bomb.o herb.o
> web.o ispell.o tournament.o stores.o mccp.o mount.o riddles.o disguise.o
> mapmaker.o roster.o system.o -lcrypt 
> act_info.o: In function `do_password(char_data *, char *)':
> /home/shadows/SoTcpp/SoT/src/act_info.cpp:5524: undefined reference to
> `crypt(char const *, char const *)'
> /home/shadows/SoTcpp/SoT/src/act_info.cpp:5541: undefined reference to
> `crypt(char const *, char const *)'
> act_wiz.o: In function `do_resetpassword(char_data *, char *)':
> /home/shadows/SoTcpp/SoT/src/act_wiz.cpp:818: undefined reference to
> `crypt(char const *, char const *)'
> comm.o: In function `nanny(descriptor_data *, char *)':
> /home/shadows/SoTcpp/SoT/src/comm.cpp:2758: undefined reference to
> `crypt(char const *, char const *)'
> /home/shadows/SoTcpp/SoT/src/comm.cpp:2922: undefined reference to
> `crypt(char const *, char const *)'
> comm.o:/home/shadows/SoTcpp/SoT/src/comm.cpp:2945: more undefined references
> to `crypt(char const *, char const *)' follow
> collect2: ld returned 1 exit status
> make: *** [sot] Error 1

Can you show some examples of how you are calling crypt?? Also we'll need the
definitions of the variables you are passing. It looks to me as though it's
trying to locate a crypt function that takes 2 character pointers that are
constant, instead of the standard crypt function which takes 2 character
pointers to constant data.

The difference is:

const char * foo = "Testing Testing 123";
char const * bar = "This is a Test";

foo = "This is a new string"; // This line is OK.
foo[7] = '\n';                // This line will give a compiler error.

bar = "This is a new string"; // This line will give a compiler error.
bar[7] = '\n';                // This line is OK.

In the first case you can change the value of the pointer, but not the value of
the data being pointed to.

In the second case you can change the value of the data being pointed to, but
not the value of the pointer.

~Kender


=====
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/L/C/O d-(+) s++:+ a-- C+++$>++++ UBLS++++$ 
P+++(--)$ L++>+++ E--- W+>++$ N !o K? w(--) !O 
M- !V PS+ PE(++) Y+ PGP->+ t- 5 X+() R(+) tv+@ 
b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
------END GEEK CODE BLOCK------

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Reply via email to