Re: Custom types for a Windows server - Mailing list pgsql-admin

From Armel HERVE
Subject Re: Custom types for a Windows server
Date
Msg-id 43A921C1.4050600@laposte.net
Whole thread Raw
In response to Custom types for a Windows server  (Armel HERVE <ah.pgsql@laposte.net>)
Responses Re: Custom types for a Windows server
List pgsql-admin
Magnus Hagander wrote:
we made some custom types (written in C)  for PostgreSQL onto 
a Linux server.
We need to deploy a Windows server...

The documentation does not talk about a shared library for Windows
(http://www.postgresql.org/docs/8.1/interactive/xfunc-c.html#DFUNC)
I tried to compile its custom types with borland bcc32, with 
no success:

Does somebody can help me ?
   
You need to compile the functions using MingW GCC.

//Magnus
 
Thanks again for your answers.
Now, when I try to generate the shared library by the following command:
gcc -shared -o pstypes.dll -Wl,-dy,--library-path,/c/Program\ Files/PostgreSQL/8.1/lib/,-l,libpq.a,--out-implib,pstypes.a country.o

the compiler response is:
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -llibpq.a
collect2: ld returned 1 exit status

but the libpq.a is in the lib repository of PostgresSQL...

I tried to link with the libpq.dll located in the bin repository, the response is the same: cannot find -llibpq.dll

Armel

pgsql-admin by date:

Previous
From: Pandurangan R S
Date:
Subject: Re: PostgreSQL 7.4.10 hanging on delete
Next
From: Armel HERVE
Date:
Subject: Re: Custom types for a Windows server