Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA20525; Sat, 12 Jun 93 11:57:39 -0700
Message-Id: <9306121857.AA20525@postgres.Berkeley.EDU>
From: Mike Olson <mao@postgres.Berkeley.EDU>
Subject: Re: a linking question
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: cschang@cat.syr.edu's message of 12 Jun 1993 14:33 EDT
Date: Sat, 12 Jun 1993 11:58:19 -0700
From: Mike Olson <mao@postgres.Berkeley.EDU>

"Cheng S. Chang" <cschang@cat.syr.edu> writes:

> Hi !
> A linking question:
> 
> The command which I executed is as follow:
> "cc -I/usr/local/postgres/src/backend/obj -I/usr/local/postgres/src/backend -
  +L/usr/local/postgres/src/libpq/obj test.c -o test"
> 
> The message which I received is as follows:
> ld: Undefined symbol 
>    _PQsetdb 
>    _p_write 
>    _PQexec 
>    _p_open 
> 
> How can I compile a program with the above four functions successfully? 

add -lpq to the cc command line.
