[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I'm probably missing some c headers, but what ?
Oded Arbel <odeda-linux-il@betalfa.org.il> writes:
> I'm trying to write a c program that uses the crypt function
> (char *crypt(const char *key, const char *salt) ) but when I try to
> compile it, I get these error messages :
> /tmp/cca119381.o: In function `passchek':
> /tmp/cca119381.o(.text+0x64): undefined reference to `crypt'
> /tmp/cca119381.o: In function `passchng':
> /tmp/cca119381.o(.text+0x283): undefined reference to `crypt'
>
> I think I should have the relevant source some where around here (I have
> the relevant man page, so I figured...) but I couldn't figure out which,
> where, what and .. ahmm... who ?
>
> anyone can help ?
This looks like a linking problem. You didn't link the right
library. Are you sure you are linking libc in? I think crypt is in
libc, at least I see the symbol there. Of course, I assume you
#included <unistd.h>.
--
Oleg Goldshmidt goldshmt@netvision.net.il
BLOOMBERG L.P. (BFM) oleg@bfr.co.il