Subject: Help

From: David Brown - Computer Centre <[email-masked]>
Date: Thu, 28 Apr 94 12:47:22 GMT

Hi, 
    I wonder if anyone can help me fast. Trying to compile a C program that 
   interacts with postgres nad receive the following :

diana30> !cc
cc overpaid_2.c -I. -I/diana30g/postgres/include -I/diana30g/postgres/src/backend -I/diana30g/postgres/include/port/sparc -L/diana30g/postgres/lib -lpq
ld: Undefined symbol 
   _GetAttributeByName 

any ideas!!!!!
cheers dav

**********************************************
*  P A I S L E Y    U N I V E R S I T Y      *
**********************************************
*
*  David Brown 
*  Analyst/Programmer
*  Computer Centre ( User Support )
*  Paisley University
*  High Street 
*  Paisley
*  Renfrewshire
*  PA1 2BE
*  voice (041-848-3714)
*  fax   (041-887-0812)
***********************************************
.\

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 28 Apr 94 12:11:31 -0700

David Brown - Computer Centre <[email-masked]> writes:
> cc overpaid_2.c -I. -I/diana30g/postgres/include -I/diana30g/postgres/src/bac
kend -I/diana30g/postgres/include/port/sparc -L/diana30g/postgres/lib -lpq
>    _GetAttributeByName 

you don't need GetAttributeByName for frontend functions -- the 
interface for that is part of libpq.  unfortunately there are no
examples in the user manual on how to use libpq, you just have to
slog through the rather non-tutorial discussion in the ref manual
and look at src/contrib and src/bin for examples.

GetAttributeByName is a hack to provide a tuple interface for 
functions that are loaded in the backend server and need to 
work on one tuple at a time.  if you are trying to load this into
the backend, you don't want -lpq and you do want -c in there 
somewhere.  you also need to create a shared object in accordance
with the user manual.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki