pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
libpq linking problem
3+ messages / 2 participants
[nested] [flat]

* libpq linking problem
@ 1999-12-13 08:54 Emil Malmberg <emil@iconmedialab.dk>
  0 siblings, 0 replies; 3+ messages in thread

From: Emil Malmberg @ 1999-12-13 08:54 UTC (permalink / raw)
  To: pgsql-interfaces

Hi!

I'm considering using postgreSQL via the libpq interface with an
application I'm developing in C. I tried compiling one of the example
programs (the first one) from the libpq documentation. I received the
following error:

% gcc test.c -lpq
/usr/lib/libpq.so: undefined reference to 'crypt'

Does anyone know what the problem might be? I'm on a Redhat Linux
2.2.5-15 system, with the following installations:
gcc: egcs 2.91.66
ld: 2.9.1
postgreSQL: 6.4.2-3

Thanks for your help.

-----
Emil Malmberg
Programmer
Icon Medialab Denmark

+45 3338 4958
emil@iconmedialab.dk
www.iconmedialab.dk




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* libpq linking problem
@ 1999-12-13 08:59 Emil Malmberg <emil@iconmedialab.dk>
  1999-12-13 09:46 ` Re: [INTERFACES] libpq linking problem Michael Meskes <meskes@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Emil Malmberg @ 1999-12-13 08:59 UTC (permalink / raw)
  To: pgsql-interfaces

Hi!

I'm considering using postgreSQL via the libpq interface with an
application I'm developing in C. I tried compiling one of the example
programs (the first one) from the libpq documentation. I received the
following error:

% gcc test.c -lpq
/usr/lib/libpq.so: undefined reference to 'crypt'

Does anyone know what the problem might be? I'm on a Redhat Linux
2.2.5-15 system, with the following installations:
gcc: egcs 2.91.66
ld: 2.9.1
postgreSQL: 6.4.2-3

Thanks for your help.


-----
Emil Malmberg
Programmer
Icon Medialab Denmark

+45 3338 4958
emil@iconmedialab.dk
www.iconmedialab.dk




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] libpq linking problem
  1999-12-13 08:59 libpq linking problem Emil Malmberg <emil@iconmedialab.dk>
@ 1999-12-13 09:46 ` Michael Meskes <meskes@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Meskes @ 1999-12-13 09:46 UTC (permalink / raw)
  To: Emil Malmberg <emil@iconmedialab.dk>; +Cc: pgsql-interfaces

On Mon, Dec 13, 1999 at 09:59:45AM +0100, Emil Malmberg wrote:
> I'm considering using postgreSQL via the libpq interface with an
> application I'm developing in C. I tried compiling one of the example

I hope you know that there is also an embedded SQL interface. :-)

> ...
> % gcc test.c -lpq
> /usr/lib/libpq.so: undefined reference to 'crypt'

Just add -lcrypt. Glibc2 needs to add it.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-12-13 09:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-13 08:54 libpq linking problem Emil Malmberg <emil@iconmedialab.dk>
1999-12-13 08:59 libpq linking problem Emil Malmberg <emil@iconmedialab.dk>
1999-12-13 09:46 ` Michael Meskes <meskes@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox