Re: [INTERFACES] ecpg and embedded SQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rhayhow(at)cs(dot)nmsu(dot)edu
Cc: pgsql-interfaces(at)hub(dot)org
Subject: Re: [INTERFACES] ecpg and embedded SQL
Date: 1998-09-04 01:23:43
Message-ID: 5524.904872223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

rhayhow <rhayhow(at)cs(dot)nmsu(dot)edu> writes:
> I get the following errors...
> /usr/local/postgresql/lib/libpq.a(fe-connect.o): In function `connectDB':
> fe-connect.o(.text+0xf6c): undefined reference to `gethostbyname'
> fe-connect.o(.text+0x10e0): undefined reference to `socket'
> fe-connect.o(.text+0x116c): undefined reference to `connect'
> fe-connect.o(.text+0x1218): undefined reference to `getprotobyname'
> fe-connect.o(.text+0x127c): undefined reference to `setsockopt'
> fe-connect.o(.text+0x12e0): undefined reference to `getsockname'

On some systems, these network-related functions are not in the regular
C library, but in other libraries. Likely you need to add "-lsocket"
or something like that to the link command.

The Postgres configure script presumably got it right, if you were able
to install a working psql. Try looking at what the makefile for psql
is doing.

regards, tom lane

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message 9sun 1998-09-04 09:08:17
Previous Message Chris Hardie 1998-09-03 21:52:23 DBI w/Postgres