pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: ash <xpi@aeria.net>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Darwin libpq link failing
Date: Thu, 6 Mar 2003 23:06:49 -0500 (EST)
Message-ID: <200303070406.h2746nD19275@candle.pha.pa.us> (raw)
In-Reply-To: <18653.1046627309@sss.pgh.pa.us>

Tom Lane wrote:
> ash <xpi@aeria.net> writes:
> > gcc -O -pipe  -Wall -g -Dbugs -I/Users/xpi/tmpsrc/lib/mutilities  -L/Users/xpi/tmpsrc/lib/mutilities -Dpthreads -Ddarwin -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpq -lpq   mutil.o maintest.c
> > ld: Undefined symbols:
> > _PQclear
> > _PQerrorMessage
> > _PQsetdbLogin
> 
> Surely the library reference must come after the files that reference
> it.

Right.  Some linkers seem to do reordering themselves, while others
require the ordering to be specified in the proper dependency order;  I
prefer a linker that doesn't do any reordering itself --- it can lead to
surprises and doesn't handle well cases where the same symbol is defined
in multiple libraries.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (3+ messages)

Message-ID: <200303070406.h2746nD19275@candle.pha.pa.us>
Permalink:  ../200303070406.h2746nD19275@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200303070406.h2746nD19275@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, xpi@aeria.net
  Subject: Re: Darwin libpq link failing
  In-Reply-To: <200303070406.h2746nD19275@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox