Обсуждение: libpq test

Поиск
Список
Период
Сортировка

libpq test

От
Igor
Дата:
I have some problems with libpq library.

when I test a libpq library

gcc pg_test.c -o pg_test.o /usr/local/pgsql/lib/libpq.a

where pg_test.c is a testlibpq.c - Test the C version of Libpq, the
Postgres frontend
library from manual.
I have an error message 

/usr/local/pgsql/lib/libpq.a(fe-auth.o): In function
`pg_password_sendauth':
fe-auth.o(.text+0x27): undefined reference to `crypt'

I have FreBsd/i386 and Postgresql 6.5.1 version.

help me, please.


Re: [SQL] libpq test

От
Tom Lane
Дата:
Igor <i_v_z@motor.ru> writes:
> fe-auth.o(.text+0x27): undefined reference to `crypt'

Add "-lcrypt" to your link command.  crypt() isn't in libc in Linux,
it's in a separate libcrypt library...
        regards, tom lane