[HACKERS] Help! DLL make faild under windows mingw.

2007-05-29 Thread Wang Haiyong
I am doing a DLL project, it is in the backend/utils/mb. But it can not be 
maked under windows mingw.
I require everyone to help me. Thank your very much.

The error infomations are as follows.

Info: resolving _CurrentMemoryContext by linking to __imp__CurrentMemoryContext 
(auto-import)
Info: resolving _SPI_processed by linking to __imp__SPI_processed (auto-import)
Info: resolving _SPI_tuptable by linking to __imp__SPI_tuptable (auto-import)
Info: resolving _default_statistics_target by linking to 
__imp__default_statistics_target (auto-import)
fu01.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu02.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu03.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu04.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu05.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu06.o(.idata$3+0xc): more undefined references to `libpostgres_a_iname' 
follow
nmth00.o(.idata$4+0x0): undefined reference to `_nm__CurrentMemoryContext'
nmth000111.o(.idata$4+0x0): undefined reference to `_nm__SPI_processed'
nmth000118.o(.idata$4+0x0): undefined reference to `_nm__SPI_tuptable'
nmth000127.o(.idata$4+0x0): undefined reference to 
`_nm__default_statistics_target'
d:\MinGW\bin\dllwrap.exe: d:\MinGW\bin\gcc exited with status 1
make: *** [libnsqlgeom.dll] Error 1




--
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) is intended only for the use of the intended 
recipient and may be confidential and/or privileged of Neusoft Group Ltd., its 
subsidiaries and/or its affiliates. If any reader of this communication is not 
the intended recipient, unauthorized use, forwarding, printing, storing, 
disclosure or copying is strictly prohibited, and may be unlawful. If you have 
received this communication in error, please immediately notify the sender by 
return e-mail, and delete the original message and all copies from your system. 
Thank you. 
---



Re: [HACKERS] Help! DLL make faild under windows mingw.

2007-05-29 Thread Andrei Kovalevski
Hi!

What exactly are you trying to build? If you have own-written Makefile
for this - post it here. Does your code contain #define BUILDING_DLL
before inclusion of PostgreSQL headers?

Wang Haiyong wrote:
 I am doing a DLL project, it is in the backend/utils/mb. But it can
 not be maked under windows mingw.
 I require everyone to help me. Thank your very much.
 The error infomations are as follows.
 Info: resolving _CurrentMemoryContext by linking to
 __imp__CurrentMemoryContext (auto-import)
 Info: resolving _SPI_processed by linking to __imp__SPI_processed
 (auto-import)
 Info: resolving _SPI_tuptable by linking to __imp__SPI_tuptable
 (auto-import)
 Info: resolving _default_statistics_target by linking to
 __imp__default_statistics_target (auto-import)
 fu01.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu02.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu03.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu04.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu05.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu06.o(.idata$3+0xc): more undefined references to
 `libpostgres_a_iname' follow
 nmth00.o(.idata$4+0x0): undefined reference to
 `_nm__CurrentMemoryContext'
 nmth000111.o(.idata$4+0x0): undefined reference to `_nm__SPI_processed'
 nmth000118.o(.idata$4+0x0): undefined reference to `_nm__SPI_tuptable'
 nmth000127.o(.idata$4+0x0): undefined reference to
 `_nm__default_statistics_target'
 d:\MinGW\bin\dllwrap.exe: d:\MinGW\bin\gcc exited with status 1
 make: *** [libnsqlgeom.dll] Error 1



---(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


Re: [HACKERS] Help! DLL make faild under windows mingw.

2007-05-29 Thread Wang Haiyong
You are right. Thanks.

I found macro BUILDING_DLL in the file src/Makefile.port. 
I move the DLL source code from the backend path. It can be successfully built.

The file Makefile.port contains 
ifneq (,$(findstring backend,$(subdir)))
ifeq (,$(findstring conversion_procs,$(subdir)))
override CPPFLAGS+= -DBUILDING_DLL
endif
endif


- Original Message - 
From: Andrei Kovalevski [EMAIL PROTECTED]
To: pgsql-hackers@postgresql.org
Sent: Wednesday, May 30, 2007 1:35 AM
Subject: Re: [HACKERS] Help! DLL make faild under windows mingw.


 Hi!
 
 What exactly are you trying to build? If you have own-written Makefile
 for this - post it here. Does your code contain #define BUILDING_DLL
 before inclusion of PostgreSQL headers?
 
 Wang Haiyong wrote:
 I am doing a DLL project, it is in the backend/utils/mb. But it can
 not be maked under windows mingw.
 I require everyone to help me. Thank your very much.
 The error infomations are as follows.
 Info: resolving _CurrentMemoryContext by linking to
 __imp__CurrentMemoryContext (auto-import)
 Info: resolving _SPI_processed by linking to __imp__SPI_processed
 (auto-import)
 Info: resolving _SPI_tuptable by linking to __imp__SPI_tuptable
 (auto-import)
 Info: resolving _default_statistics_target by linking to
 __imp__default_statistics_target (auto-import)
 fu01.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu02.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu03.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu04.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu05.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
 fu06.o(.idata$3+0xc): more undefined references to
 `libpostgres_a_iname' follow
 nmth00.o(.idata$4+0x0): undefined reference to
 `_nm__CurrentMemoryContext'
 nmth000111.o(.idata$4+0x0): undefined reference to `_nm__SPI_processed'
 nmth000118.o(.idata$4+0x0): undefined reference to `_nm__SPI_tuptable'
 nmth000127.o(.idata$4+0x0): undefined reference to
 `_nm__default_statistics_target'
 d:\MinGW\bin\dllwrap.exe: d:\MinGW\bin\gcc exited with status 1
 make: *** [libnsqlgeom.dll] Error 1
 
 
 
 ---(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


--
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) is intended only for the use of the intended 
recipient and may be confidential and/or privileged of Neusoft Group Ltd., its 
subsidiaries and/or its affiliates. If any reader of this communication is not 
the intended recipient, unauthorized use, forwarding, printing, storing, 
disclosure or copying is strictly prohibited, and may be unlawful. If you have 
received this communication in error, please immediately notify the sender by 
return e-mail, and delete the original message and all copies from your system. 
Thank you. 
---


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster