Thread: undefined reference to 'crypt'

undefined reference to 'crypt'

From
"alan yang"
Date:
Hello,

After successfully installed postgresql, I tried to compile the libpq++ test
program.
In a RedHat 6.0 system, I ran into the following error:
/usr/lib/libpq.so.2.0 undefined reference to 'crypt'.

Any way to get around of this?  Thanks in advance.

alan


Re: undefined reference to 'crypt'

From
sieberg@cadvision.com (Ross Sieber)
Date:
On 30 Aug 1999 19:37:55 -0400, alan_yang@hp.com ("alan yang") wrote:


>After successfully installed postgresql, I tried to compile the libpq++ test
>program.
>In a RedHat 6.0 system, I ran into the following error:
>/usr/lib/libpq.so.2.0 undefined reference to 'crypt'.

You probably need to add -lcrypt to the LIBS line in the Makefile.
crypt is sometimes in libs, and sometimes not.