Subject: Compiler command to use libpq (fwd)

From: quan liu <[email-masked]>
Date: Mon, 21 Feb 1994 18:00:55 -0500 (EST)

Forwarded message:
>From [email-masked] Mon Feb 21 10:19:00 1994
From: quan liu <[email-masked]>
Date: Mon, 21 Feb 1994 10:18:53 -0500
Message-Id: <[email-masked]>
To: [email-masked]
Subject: Compiler command to use libpq
Cc: [email-masked]

      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