I get a linker error whenever I attempt to call the crypt or fcrypt functions in a program I compile with gcc. the result is something like the following: /tmp/cca070171.o: In function `main': /tmp/cca070171.o(.text+0xe): undefined reference to `crypt' Here is the program that give that error: #define _XOPEN_SOURCE #include <unistd.h> #include <stdio.h> void main(void) { printf("%d\n", crypt("password", "Na")); } This doesn't occur under RedHat 4.2 or other systems not using GLibc.
Add -lcrypt.