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

* linking error
@ 1998-12-11 19:50 Randall W. Barrett <rbarr@shadow.net>
  1998-12-12 01:49 ` Re: [INTERFACES] linking error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Randall W. Barrett @ 1998-12-11 19:50 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

I am running Redhat linux (2.0.34) and postgreSQL 6.3.2.  I'm trying to
use the C-interface via libpq, but I'm having linking problems.  The
following is the result when attempting to compile sample1 from the
postgres libpq documentation:

[rbarrett@localhost rbarrett]$ gcc -O3 -Wall sample1.c -I
/usr/local/pgsql/include/ -L /usr/local/pgsql/lib/ -lpq 

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

Does anyone know how I can fix this?  Need I upgrade to 6.4? 

Thanks,
	Randy Barrett






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

* Re: [INTERFACES] linking error
  1998-12-11 19:50 linking error Randall W. Barrett <rbarr@shadow.net>
@ 1998-12-12 01:49 ` Tom Lane <tgl@sss.pgh.pa.us>
  1998-12-12 05:39   ` Re: [INTERFACES] linking error Randall W. Barrett <rbarr@shadow.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 1998-12-12 01:49 UTC (permalink / raw)
  To: Randall W. Barrett <rbarr@shadow.net>; +Cc: pgsql-interfaces@hub.org

"Randall W. Barrett" <rbarr@shadow.net> writes:
> [rbarrett@localhost rbarrett]$ gcc -O3 -Wall sample1.c -I
> /usr/local/pgsql/include/ -L /usr/local/pgsql/lib/ -lpq 

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

> Does anyone know how I can fix this?  Need I upgrade to 6.4? 

For the moment you should be able to fix it by adding -lcrypt to
the end of the gcc command.  I've been trying to fix things so that
it's not necessary to do that ...  but it's proving very hard to
make it work properly everywhere :-(.  Cross-references between
shared libraries seem not to be very portable on Unix systems yet.

			regards, tom lane



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

* Re: [INTERFACES] linking error
  1998-12-11 19:50 linking error Randall W. Barrett <rbarr@shadow.net>
  1998-12-12 01:49 ` Re: [INTERFACES] linking error Tom Lane <tgl@sss.pgh.pa.us>
@ 1998-12-12 05:39   ` Randall W. Barrett <rbarr@shadow.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Randall W. Barrett @ 1998-12-12 05:39 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces@hub.org

Tom,

Thanks.

	Randy Barrett

On Fri, 11 Dec 1998, Tom Lane wrote:

> "Randall W. Barrett" <rbarr@shadow.net> writes:
> > [rbarrett@localhost rbarrett]$ gcc -O3 -Wall sample1.c -I
> > /usr/local/pgsql/include/ -L /usr/local/pgsql/lib/ -lpq 
> 
> > /usr/local/pgsql/lib//libpq.a(fe-auth.o): In function
> > `pg_password_sendauth':
> > fe-auth.o(.text+0x17): undefined reference to `crypt'
> 
> > Does anyone know iqqhow I can fix this?  Need I upgrade to 6.4? 
> 
> For the moment you should be able to fix it by adding -lcrypt to
> the end of the gcc command.  I've been trying to fix things so that
> it's not necessary to do that ...  but it's proving very hard to
> make it work properly everywhere :-(.  Cross-references between
> shared libraries seem not to be very portable on Unix systems yet.
> 
> 			regards, tom lane
> 
> 




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


end of thread, other threads:[~1998-12-12 05:39 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-12-11 19:50 linking error Randall W. Barrett <rbarr@shadow.net>
1998-12-12 01:49 ` Tom Lane <tgl@sss.pgh.pa.us>
1998-12-12 05:39   ` Randall W. Barrett <rbarr@shadow.net>

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