How I can add new function writing on C under Win32 for PostgreSQL v 8.0.1

Started by deeps1about 21 years ago2 messagesgeneral
Jump to latest
#1deeps1
deeps@cg.ukrtel.net

Hello pgsql-committers,

How I can compiling and linking Dynamically-Loaded Functions on Win32?

In Docs describe all platforms BSD , FreeBSD,

Linux for example
The compiler flag to create PIC is -fpic. On some platforms in some situations -fPIC must be used if -fpic does not work. Refer to the GCC manual for more information. The compiler flag to create a shared library is -shared. A complete example looks like this:

cc -fpic -c foo.c
cc -shared -o foo.so foo.o

but no describe under Win32 for Postges 8.0.1 under Win32

--
Best regards,
deeps1 mailto:deeps@cg.ukrtel.net

#2Bruce Momjian
bruce@momjian.us
In reply to: deeps1 (#1)
Re: [COMMITTERS] How I can add new function writing on C under Win32

deeps1 wrote:

Hello pgsql-committers,

How I can compiling and linking Dynamically-Loaded Functions on Win32?

In Docs describe all platforms BSD , FreeBSD,

Linux for example
The compiler flag to create PIC is -fpic. On some platforms in some situations -fPIC must be used if -fpic does not work. Refer to the GCC manual for more information. The compiler flag to create a shared library is -shared. A complete example looks like this:

cc -fpic -c foo.c
cc -shared -o foo.so foo.o

but no describe under Win32 for Postges 8.0.1 under Win32

[ Moved to 'general'.]

Take a look at how the regression tests link regress.so using the MinGW
tools and that will show the flags to use.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073