Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.8.8/8.7.5) with ESMTP id VAA21270 for ; Thu, 3 Sep 1998 21:24:34 -0400 (EDT) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA05527; Thu, 3 Sep 1998 21:23:43 -0400 (EDT) To: rhayhow@cs.nmsu.edu cc: pgsql-interfaces@hub.org Subject: Re: [INTERFACES] ecpg and embedded SQL In-reply-to: Your message of Thu, 03 Sep 1998 09:53:56 -0600 <35EEBB94.34A3@cs.nmsu.edu> Date: Thu, 03 Sep 1998 21:23:43 -0400 Message-ID: <5524.904872223@sss.pgh.pa.us> From: Tom Lane rhayhow 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