Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id PAA21178 for postgres-dist; Mon, 21 Feb 1994 15:01:20 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199402212301.PAA21178@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from news.cis.ohio-state.edu (news.cis.ohio-state.edu [128.146.8.50]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id PAA21169 for <postgres@postgres.berkeley.edu>; Mon, 21 Feb 1994 15:01:19 -0800
Received: from celery.cis.ohio-state.edu (celery.cis.ohio-state.edu [128.146.63.8]) by news.cis.ohio-state.edu (8.6.5/8.6.4) with ESMTP id SAA23366 for <postgres@postgres.berkeley.edu>; Mon, 21 Feb 1994 18:01:10 -0500
From: quan liu <qliu@cis.ohio-state.edu>
Received: from localhost (qliu@localhost) by celery.cis.ohio-state.edu (8.6.5/8.6.4) id SAA06739 for postgres@postgres.berkeley.edu; Mon, 21 Feb 1994 18:00:57 -0500
Message-Id: <199402212300.SAA06739@celery.cis.ohio-state.edu>
Subject: Compiler command to use libpq (fwd)
To: postgres@postgres.Berkeley.EDU
Date: Mon, 21 Feb 1994 18:00:55 -0500 (EST)
X-Mailer: ELM [version 2.4 PL23]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1102      
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Mon, 21 Feb 94 15:01:20 -0800
Resent-XMts: smtp

Forwarded message:
>From qliu@cis.ohio-state.edu Mon Feb 21 10:19:00 1994
From: quan liu <qliu@cis.ohio-state.edu>
Date: Mon, 21 Feb 1994 10:18:53 -0500
Message-Id: <199402211518.KAA19458@broccoli.cis.ohio-state.edu>
To: postgres_request@postgres.berkley.edu
Subject: Compiler command to use libpq
Cc: qliu@cis.ohio-state.edu


      I have the following program to us libpq:

     #include <stdio.h>
#include "tmp/libpq.h"


main ()
{
  PQsetdb ("qliu");
  PQexec("create foo (a = int4, b=char16,d=float8)");
  PQexec("copy foo from stdin");
  PQputline("3\thellow world\t4.50");
  PQputline("4\tgoodbye world\t7.11");
  PQputline(".\n");
  PQendcopy();
}                     


  And I tried to compile it by cc -I..../src/backend test.c. However I got
the following message 
   ld: Undefined symbol 
   _PQsetdb 
   _PQputline 
   _PQexec 
   _PQendcopy 

  By the way, I also have another question for you. That is where the database is stored for postgres, and whether the path name should be included in the 
 dbname of PQsetdb.

   I would really appreciate your help. Thanks a lot!

  Quan Liu

