Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

Next:From: 9sunDate: 1998-09-04 09:08:17
Subject:
Previous:From: Chris HardieDate: 1998-09-03 21:52:23
Subject: DBI w/Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group