Re: postgres.h

From: "Nupur Pande" <npande(at)vt(dot)edu>
To: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: postgres.h
Date: 2003-11-04 18:28:06
Message-ID: 019201c3a301$640f6090$6500a8c0@RANIKHET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)tishler(dot)net>
To: "Nupur Pande" <npande(at)vt(dot)edu>
Cc: <pgsql-cygwin(at)postgresql(dot)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

In response to

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Frank Seesink 2003-11-05 00:12:52 Re: postgres.h
Previous Message Muhyiddin A.M Hayat 2003-11-04 18:22:31 shared memory