From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199802251806.NAA24999@rrdjazz.nist.gov> Date: Wed, 25 Feb 1998 13:09:44 -0500 (EST) From: Christopher C Chimelis Subject: Re: Compileing In-Reply-To: On Wed, 25 Feb 1998 mike@alpha.lab.realminfo.com wrote: > Yup... This: > > nwdbm.o: In function `crypt_pw_ok': > nwdbm.c(.text+0x56d8): undefined reference to `crypt' > nwdbm.c(.text+0x56dc): undefined reference to `crypt' > make[2]: *** [nwbind] Error 1 > This is dureing the linking stage. > I get the same error in a small test prog that I wrote when I try to > compile it also. You need to add -lcrypt to your gcc command. This will link in libcrypt, which contains the crypt() function. Without linking to libcrypt, it won't know what code to include for the crypt() function since it only links to glibc unless other libraries are included as well with the -l switch. For more info on this, check the linker options section in the info files that came with gcc :) Hope this helps! Chris -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com