Re: Unable to link to libpq using gcc 2.95.3-5

From: Jason Tishler <jason(at)tishler(dot)net>
To: "Luis R(dot) Alonso" <alonso(at)alumni(dot)carnegiemellon(dot)edu>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Unable to link to libpq using gcc 2.95.3-5
Date: 2002-02-25 02:59:41
Message-ID: 20020225025940.GC2628@hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Luis,

On Sun, Feb 24, 2002 at 06:03:27PM -0500, Luis R. Alonso wrote:
> I compile with the following command:
>
> g++ -I/usr/include/postgresql -L/lib -lpq

Where are the *.o or *.cc files in the command above?

> I get output that looks like:
>
> /temp/ccLZlm8Y.o(.text+0xe):simple.cxx: undefined reference to `PQfinish'
> [snip]

My WAG is that you are listing the libraries (i.e., -lpq) before the
object files. Note that on Linux this will work -- under Cygwin it won't.

Jason

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message S. L. 2002-02-25 08:25:49 Re: Need libpgtcl on cygwin -- available?
Previous Message Jason Tishler 2002-02-25 02:55:51 Re: Problem to sta