Re: postgres.h - Mailing list pgsql-cygwin

From Nupur Pande
Subject Re: postgres.h
Date
Msg-id 019201c3a301$640f6090$6500a8c0@RANIKHET
Whole thread Raw
In response to Re: COPY error  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: postgres.h
Re: postgres.h
List pgsql-cygwin
Thanks a lot.. that did work.
One last question (hopefully)
I'm trying to create a .so file. My makefile looks like this:

all: RuleFinder.so

RuleFinder.so: RuleFinder.o
        gcc -shared -o RuleFinder.so RuleFinder.o

RuleFinder.o: <files>
        gcc -I /usr/include/postgresql/server -fpic -c RuleFinder.c

When I run make, the .o file gets created but not the .so. I get the
following errors:

gcc -I /usr/include/postgresql/server -fpic -c RuleFinder.c
cc1: warning: -fpic ignored for target (all code is position independent)
gcc -shared -o RuleFinder.so RuleFinder.o
RuleFinder.o(.text+0x16c1):RuleFinder.c: undefined reference to `_SPI_exec'
RuleFinder.o(.text+0x1cf2):RuleFinder.c: undefined reference to
`_pg_detoast_datum'
RuleFinder.o(.text+0x1d06):RuleFinder.c: undefined reference to
`_pg_detoast_datum'
RuleFinder.o(.text+0x2152):RuleFinder.c: undefined reference to
`_GetAttributeByName'
RuleFinder.o(.text+0x2438):RuleFinder.c: undefined reference to
`_GetAttributeByName'

Did I do something wrong?

Thanks,
Nupur

----- Original Message -----
From: "Jason Tishler" <jason@tishler.net>
To: "Nupur Pande" <npande@vt.edu>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Tuesday, November 04, 2003 11:26 AM
Subject: Re: [CYGWIN] postgres.h


> Nupur,
>
> On Tue, Nov 04, 2003 at 10:31:28AM -0500, Nupur Pande wrote:
> > How do I set path in postgres for it to find all the header files? Now
> > that everything is installed, I thought it would do that
> > automatically.. but I'm still getting compiler errors.. Do I have to
> > save my C files in some particular directory?
>
> I presume you would have to do something like the following:
>
>     gcc -I/usr/include/postgresql/server ...
>
> Jason


pgsql-cygwin by date:

Previous
From: "Muhyiddin A.M Hayat"
Date:
Subject: shared memory
Next
From: "Emanuele Bonin"
Date:
Subject: Problems with InitDB