Your library will be named "libcrypt" so you have to have -lcrypt instead of -llib.