views:

23

answers:

0

Hi!\ I am trying to do a C function for PostgreSQL in Windows using MingW to compile. I did the function compile so fine and link but when I add the function to PostgreSQL my server goes down and I dont know why.

I use this to compile and link my code C:\mingw\bin\gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I "C:/Program Files/PostgreSQL/8.3/include/" -I "C:/Program Files/PostgreSQL/8.3/include/server" -I "C:/Program Files/PostgreSQL/8.3/include/server port/win32" -DEXEC_BACKEND "-I C:/Program Files/PostgreSQL/8.3/include/server/port/win32" -c pg2.c -o pg2.o

C:\mingw\bin\gcc -shared -o pg_server_function.dll pg2.o -L "C:\Program Files\PostgreSQL\8.3\lib" -lpostgres

Anybody here any cluees to help me ?? TIA Edwin Jaws