win32 contrib linking fails

Andreas Pflug <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
When referencing postmaster variables (e.g. GUC variables), linking of 
contrib modules fail.

What I get is
INFO: resolving _PostmasterPid by linking to __imp__PostmasterPid 
(auto-import)
undefined reference to 'libpostgres_a_iname'
undefined reference to '_nm__PostmasterPid'

I find the symbol in postgres.def (PostmasterPid @934 DATA), and 
libpostgres.a has __imp__PostmasterPid.

Apparently all symbols in DATA are not resolvable. Any hints?

dlltool --version 2.13.90,
gcc --version 3.2.3 (mingw 20030504-1)

Regards,
Andreas

PS
There's a cyclic reference in libraries, which seems a bit dubious: 
libpgport.a is made with references to libpostgres.a and vice versa. 
Making the backend will fail if made from src/backend, with an undefined 
reference to _imp__CurrentMemoryContext.

Actually, using postgres.exe as dll is quite uncommon; usually all code 
would be stuffed into postgres.dll, with a very small postgres.exe 
(main.c) just loading and executing the dll. This might also resolve the 
contrib linkage issue. In future situations, this also might enable us 
to offer an interface to use pgsql linked to apps, without piping or 
other inter process communication.






---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.