pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mogin Mohandas <moginmo@gmail.com>
To: pgsql-ports@postgresql.org
Subject: compiling c files
Date: Wed, 27 Jul 2005 15:48:40 -0500
Message-ID: <fd2290fd05072713482c14e65d@mail.gmail.com> (raw)

Hi
  I was trying to build a new base data type into postgres. i am
using 7.4.8 on debian. There is already an eg in src/tutorial which
gives code for intenal and external functions of a new type called
complex. I tried to create a shared library for the file complex.c
using  "cc -fpic -c complex.c" .That gave me a lot of errors like the
header files
"fmgr.h" and "postgres.h" did not exist.  Then I did a  "cc -shared -o
complex.so
complex.o". The .so file had not been created. 
                    After that I went into postgres and tried to
create the functions corresponding to the new type. It says the file
complex.so could not be found. So the shared library seems to have not
been created. Does anybody know what the problem might be. If anybody
could tell me how to compile a C file in any directory and link it to
postgres I would really appreciate it.
 Thank you
Moginraj



Message-ID: <fd2290fd05072713482c14e65d@mail.gmail.com>
Permalink:  ../fd2290fd05072713482c14e65d@mail.gmail.com/
Also on:    postgresql.org/message-id/fd2290fd05072713482c14e65d@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-ports@postgresql.org
  Cc: moginmo@gmail.com
  Subject: Re: compiling c files
  In-Reply-To: <fd2290fd05072713482c14e65d@mail.gmail.com>
  References: <fd2290fd05072713482c14e65d@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox