Re: Compiling UDF DLL under Win32

Поиск
Список
Период
Сортировка
От anonymus.crux
Тема Re: Compiling UDF DLL under Win32
Дата
Msg-id 43EC93E2.9030306@mail.ee
обсуждение исходный текст
Ответ на Re: Compiling UDF DLL under Win32  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Compiling UDF DLL under Win32  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
hm, I'm still stuck: can't compile extension with mingw compiler.
I use Dev-CPP IDE (4.9.9.2) with MingW 3.7. Has it been tested to compile
extensions under XP with PostgresQL 8.1.2 ?

Al I get are compiler errors:

gcc.exe -c fd.c -o fd.o -I"C:/Dev-Cpp/include"  
-I"D:/.Work/postgresql/postgresql-8.1.2/src/include"  
-I"D:/.Work/postgresql/postgresql-8.1.2/src/include/port/win32"  
-I"D:/.Work/postgresql/postgresql-8.1.2/src/include"  
-I"D:/.Work/postgresql/postgresql-8.1.2/src/include/port/win32"  
-DBUILDING_DLL=1 -DWIN32 -DWIN32_CLIENT_ONLY=0

D:/.Work/postgresql/postgresql-8.1.2/src/include/port/win32.h:181: 
error: redefinition of typedef 'pid_t'
C:/Dev-Cpp/include/sys/types.h:75: error: previous declaration of 
'pid_t' was here

In file included from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/postgres.h:48,                from fd.c:8:
D:/.Work/postgresql/postgresql-8.1.2/src/include/c.h:328: error: 
redefinition of typedef 'sig_atomic_t'
C:/Dev-Cpp/include/signal.h:46: error: previous declaration of 
'sig_atomic_t' was here

In file included from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/access/tupdesc.h:18,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/utils/rel.h:17,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/storage/bufmgr.h:21,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/storage/bufpage.h:18,
                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/access/htup.h:17,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/utils/tqual.h:18,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/access/relscan.h:18,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/nodes/execnodes.h:17,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/executor/execdesc.h:19,                from 
D:/.Work/postgresql/postgresql-8.1.2/src/include/executor/executor.h:17,                from fd.c:10
.....
.....
.....

>>I was wondering if I can use VC compiler to compile UDF DLL ?
>>If yes then I am wondering why I am getting linking errors:
>>
>>Compiling...
>>fd.c
>>Linking...
>>   Creating library Debug/fd.lib and object Debug/fd.exp 
>>fd.obj : error LNK2001: unresolved external symbol 
>>_CurrentMemoryContext Debug/fd.dll : fatal error LNK1120: 1 
>>unresolved externals
>>
>>
>>It seems that linker is not able to find symbol CurrentMemoryContext.
>>This variable is declared in palloc.h, but I can't find the 
>>implementation of this variable in libpostgres.a ?
>>    
>>
>
>No, you need to use mingw to compile extensions.
>
>//Magnus
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>  
>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: FW: PGBuildfarm member snake Branch HEAD Status changed
Следующее
От: Simon Riggs
Дата:
Сообщение: Scrollable cursors and Sort performance