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

Re: Compiling and Linking Dynamically-Loaded Functions on Windows

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Mariano Reingart <reingart(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Compiling and Linking Dynamically-Loaded Functions on Windows
Date: 2010-09-12 00:37:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
On Wed, Aug 25, 2010 at 4:04 PM, Mariano Reingart <reingart(at)gmail(dot)com> wrote:
> There is no Windows (MSVC or MinGW) section to compile shared libraries (DLL):
> This is intentional, as it may be incompatible/hard?
> Ie. can mingw dll be used with a msvc build?
> This is a working example with mingw:
> C:\mingw\bin\gcc.exe -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv -I. -I. -I../src/include -I.../src/include/port/win32
> -DEXEC_BACKEND "-I.../src/include/port/win32" -c -o foo.o foo.c
> C:\mingw\bin\gcc.exe -shared -o foo.dll foo.o
> -fPIC seems not needed for this platform, but should -mms-bitfields
> flag be used?
> PGXS cannot be used directly as it is not included with the one click
> installer (pg_config --pgxs returns an invalid path, no makefile
> found).
> Do you think this could be included in the docs?
> (recently we had a discussion about this in the spanish mailing list,
> and seems to be unclear for most of us).

If we can figure out what the right thing to do is, +1 from me for
adding it to the docs.  But the discussion of what the right thing to
do is should probably happen on pgsql-hackers, rather than here.

Robert Haas
The Enterprise Postgres Company

In response to

pgsql-docs by date

Next:From: Tom LaneDate: 2010-09-12 04:40:32
Subject: Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Previous:From: Robert HaasDate: 2010-09-12 00:36:09
Subject: Re: Missing Win32 archive_command example

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