Skip site navigation (1) Skip section navigation (2)

'Undefined reference' error message when linking an object file

From: "VOGLOZIN W(dot) Amenel" <amenel(dot)voglozin(at)univ-nantes(dot)fr>
To: pgsql-ports(at)postgresql(dot)org
Subject: 'Undefined reference' error message when linking an object file
Date: 2006-03-11 13:44:58
Message-ID: op.s584g8wkxwch8s@pc-saintpaul.irin.sciences.univ-nantes.prive (view raw, whole thread or download thread mbox)
Lists: pgsql-ports
I'm currently developing an access method for a research project, and I  
need some experimental measures. So I wrote an extension for PostgreSQL,  
with all functions in a single C file.
I built Postgresql 8.1.3 from sources and installed it using MSYS.

Following the instructions at section 32.9 of the manual  
(, I compiled  
the C file without any message. But I just can't succeed in producing the  
shared object using MinGW & MSYS. No matter what library directory I  
indicate, I still get the same set of "undefined reference to ..."  
messages. I know this means a library is not found.
The command line I'm using is:

gcc -L/local/pgsql/lib -shared seqsumproc.o

So my questions are :
1- is there something wrong in the command line I'm using above ?
2- what is the name of the library that contains all server functions ?
3- I read from other mails on this mailing-list that the shared library  
produced by MinGW is a DLL. Is the extension automatically given or should  
I rename the file later ?

I read as much as I could to get a solution before asking here, including  
this mailing-list's archive.
Thanks for reading and any help.

pgsql-ports by date

Next:From: Edward FretwellDate: 2006-03-14 13:07:09
Subject: Advice sought: Postmaster service failing to start on Windows 2003 servers - error messages related to name resolution
Previous:From: Matt EnglandDate: 2006-03-07 01:48:22
Subject: Re: [Mingw-users] Re: How to build thread-safe postgresql 8.x

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group