Skip site navigation (1) Skip section navigation (2)

compiling c files

From: Mogin Mohandas <moginmo(at)gmail(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: compiling c files
Date: 2005-07-27 20:48:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-ports
  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.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 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

pgsql-ports by date

Next:From: Peter EisentrautDate: 2005-07-29 09:50:43
Subject: Re: Solaris SPARC - Sun compiler 5.5 - 64 bit
Previous:From: Mogin MohandasDate: 2005-07-27 07:32:07
Subject: compiling a file by creating a shared library(adding new data type)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group