pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rhayhow@cs.nmsu.edu
Cc: pgsql-interfaces@hub.org
Subject: Re: [INTERFACES] ecpg and embedded SQL
Date: Thu, 03 Sep 1998 21:23:43 -0400
Message-ID: <5524.904872223@sss.pgh.pa.us> (raw)
In-Reply-To: <35EEBB94.34A3@cs.nmsu.edu>

rhayhow <rhayhow@cs.nmsu.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



view thread (3+ messages)  latest in thread

Message-ID: <5524.904872223@sss.pgh.pa.us>
Permalink:  ../5524.904872223@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5524.904872223@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rhayhow@cs.nmsu.edu, pgsql-interfaces@hub.org
  Subject: Re: [INTERFACES] ecpg and embedded SQL
  In-Reply-To: <5524.904872223@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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