[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where do i find crypt ?



>Isn't that [crypt(3)] in libc6, folks?

WRT the message from yesterday, and this, and others:

crypt lives, for most applications, in /lib/libcrypt.*.
Some programs, like crack, provide their own, faster, version.

You specify crypt to gcc as follows:

Function prototype for C:
 char *crypt(const char *key, const char *salt);
Command line
 gcc -o file.o file.c -lcrypt

You specify it to g++ as follows:
Function declaration for C++:
  extern "C" { char *crypt(const char *key, const char *salt); }
Command line
  g++ -o file.o file.cc -lcrypt

Hope this clears up the confusion.

Carl


Reply to: