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

Re: Darwin libpq link failing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ash <xpi(at)aeria(dot)net>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Darwin libpq link failing
Date: 2003-03-07 04:06:49
Message-ID: 200303070406.h2746nD19275@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Tom Lane wrote:
> ash <xpi(at)aeria(dot)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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-interfaces by date

Next:From: Daniel Bruce LynesDate: 2003-03-07 21:36:48
Subject: Truncating lobs
Previous:From: Mr.FDate: 2003-03-06 09:59:50
Subject: New Interface for Win

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