X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9989F52C8D for ; Wed, 27 Jul 2005 17:48:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76205-01 for ; Wed, 27 Jul 2005 20:48:40 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.201]) by svr1.postgresql.org (Postfix) with ESMTP id B7AA152C14 for ; Wed, 27 Jul 2005 17:48:38 -0300 (ADT) Received: by rproxy.gmail.com with SMTP id i8so386640rne for ; Wed, 27 Jul 2005 13:48:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=AoFf4ktoOjhxgkXXJBblQRh5lIdM7j47wTi2eIWzuRNZRbli5cHrEPAvLXZq4XMdoEuI3kwcjpNgsDe0eweJDnRNinSLS3lPyy7zUCgxVn3vQt/f9yM/XQf+1bXQYT3drwqBmXhgzhqoQXkeIOMSQTkZsj13IpMVX0AwADHrodk= Received: by 10.38.209.70 with SMTP id h70mr733315rng; Wed, 27 Jul 2005 13:48:40 -0700 (PDT) Received: by 10.38.208.4 with HTTP; Wed, 27 Jul 2005 13:48:40 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2005 15:48:40 -0500 From: Mogin Mohandas Reply-To: Mogin Mohandas To: pgsql-ports@postgresql.org Subject: compiling c files Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200507/23 X-Sequence-Number: 2163 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.=20 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