Re: Unable to link to libpq using gcc 2.95.3-5 - Mailing list pgsql-cygwin

From Jason Tishler
Subject Re: Unable to link to libpq using gcc 2.95.3-5
Date
Msg-id 20020225025940.GC2628@hp.com
Whole thread Raw
In response to Unable to link to libpq using gcc 2.95.3-5  ("Luis R. Alonso" <alonso@alumni.carnegiemellon.edu>)
List 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

pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: Problem to sta
Next
From: s0lao@netscape.net (S. L.)
Date:
Subject: Re: Need libpgtcl on cygwin -- available?