Possible bug in postgres || libpq

Started by hecongover 26 years ago1 messagesbugs
Jump to latest
#1hecong
hecong@iinchina.net

my name : hecong
my email address : hecong@iinchina.net

System Configuration

Architecture: Intel Pentium
Operating System: RetHat 6.0
PostgreSQL version: PostgreSQL-6.4.2

my problem

when I compiled my program , It report:

/usr/lib/libpq.a(fe-auth.o): In function `pg_password_sendauth':
fe-auth.o(.text+0x27): undefined reference to `crypt'
collect2: ld returned 1 exit status

why ?

my program :
#include <pgsql/libpq-fe.h>
main()
{
PGconn * conn;
conn=PQsetdb(NULL,NULL,NULL,NULL,"hecong");
}

compile: cc test.c /usr/lib/libpq.a