From: | DDonnelly(at)rochgrp(dot)com |
---|---|
To: | nhv(at)cape(dot)com, pgsql-cygwin(at)postgresql(dot)org |
Subject: | Re: Problems adding C Extentions |
Date: | 2003-01-29 16:47:30 |
Message-ID: | 904D0CA3F6F98441BB3D7703189859940DD693@trgmsg.rochgrp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-cygwin |
I'm not sure where to add that directive. We use the standard configure and
make to build postgres for the cygwin environment and that seems to work
fine. For our C code we have one c module and on linux build it with the
following command :
PGINCLUDEPATH="-I `pg_config --includedir` -I
/usr/src/postgresql-7.3-1/src/include"
PGLIBPATH="-L `pg_config --libdir` -L /usr/src/postgresql-7.3-1/src/backend"
LIBNAME=`echo $1 | sed 's/\.c/.so/'`
OBJNAME=`echo $1 | sed 's/\.c/\.o/'`
LIBS="-lpostgres -lc"
echo 'This is pgcc...'
echo "gcc $PGINCLUDE -c $1"
gcc $PGINCLUDEPATH -c $1
ld -shared -o $LIBNAME $OBJNAME $PGLIBPATH $LIBS
Any more help you could provide me would be greatly appreciated.
-----Original Message-----
From: Norman Vine [mailto:nhv(at)cape(dot)com]
Sent: Wednesday, January 29, 2003 12:33 AM
To: Donnelly, Dan; pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [CYGWIN] Problems adding C Extentions
DDonnelly(at)rochgrp(dot)com writes:
> I am moving a Postgres application from Linux to Cygwin. The application
> has some Postgres extensions built in C. I get a clean compile and load,
> but when I go to load the functions into Postgres I get a load error. I
> would appreciate any guidance. Here is the code and error message:
>
> create function RealPct(int4, int4) returns float8
> as '/home/ddonn/stc/model/stcdemo/STCModel.so' language 'c'
> with(isStrict);
> ERROR: Load of file /home/ddonn/stc/model/stcdemo/STCModel.so failed:
> dlopen: Win32 error 3221225622
Make sure you have the following in your Makefile
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
HTH
Norman
From | Date | Subject | |
---|---|---|---|
Next Message | Jason Tishler | 2003-01-29 18:33:18 | Re: Initializing PostgreSQL falied |
Previous Message | Jason Tishler | 2003-01-29 15:53:09 | Re: Plperl, createlang fails |