Re: libpgeasy.h

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: "Kancha (dot)" <kancha2np(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: libpgeasy.h
Date: 2002-04-06 12:02:24
Message-ID: 1018094544.1958.10.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2002-04-06 at 10:24, Kancha . wrote:
> I'm using RH 7.2 with the default postgresql that
> comes along (ver 7.1)
>
> I'm trying to write a program usign libpgeasy. I wrote
> a sample code just to get the feel and got following
> error. I don't what it means. The program won't
> compile with gcc.
...
> /tmp/cc3OLzfr.o: In function `main':
> /tmp/cc3OLzfr.o(.text+0x12): undefined reference to
> `connectdb'
> /tmp/cc3OLzfr.o(.text+0x3b): undefined reference to
> `doquery'
> /tmp/cc3OLzfr.o(.text+0x4c): undefined reference to
> `fetch'
> /tmp/cc3OLzfr.o(.text+0x75): undefined reference to
> `disconnectdb'
> collect2: ld returned 1 exit status

The problem is that the linker is not finding the libpgeasy library.

Your compile command should include
-L/path/to/your/libpgeasy.so -lpgeasy

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"A gentle answer turns away wrath, but a harsh word
stirs up anger." Proverbs 15:1

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2002-04-06 12:40:20 Who's using PostgreSQL?
Previous Message Paulo Henrique Baptista de Oliveira 2002-04-06 10:11:14 Postgresql Strange Errror