This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Newbie questions... (crypt())
- To: greear at cyberhighway dot net (Ben Greear)
- Subject: Re: Newbie questions... (crypt())
- From: hjl at ocean dot lucon dot org (H.J. Lu)
- Date: Mon, 20 Jul 1998 12:38:08 -0700 (PDT)
- Cc: carlo at runaway dot xs4all dot nl, egcs at cygnus dot com
>
>
> On Sun, 19 Jul 1998, Carlo Wood wrote:
>
> > RedHat 5.1 uses glibc. crypt is moved outside libc and now you
> > have to add -lcrypt to your linking process (in order to link
> > with /usr/lib/libcrypt.so -> ../../lib/libcrypt.so.1).
> >
> > --
> > Carlo Wood <carlo@runaway.xs4all.nl>
>
> I tried that. It still won't compile without me adding:
>
> extern char* crypt(const char* key, const char* salt);
>
> to the top of each file that uses crypt (in other words, the #include
> doesn't work right..) After adding that, the code compiles to object
> code, but the linking still fails, even after adding the -lcrypt. Note
> that I get no errors indicating that it couldn't find the crypt
> library.
>
> I would imagine there is something wrong with they way I'm trying to
> include. Since the man page neglected to tell about the -lcrypt, it
> may be wrong in other ways as well.
>
> Does anyone have any working (example) code using crypt? Also, could
> someone point me to some official repository of the man pages for glibc?
Yes, login, pine, .... Post a small testcase. I will a take a look.
H.J.