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

libpq linker problems

From: Mike Mills <mikejmills(at)gmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq linker problems
Date: 2005-03-06 20:53:39
Message-ID: bdbdc3540503061253517178a6@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
I'm having a problem compiling my C program using libpq I have used
the proper linking directories as returned by pg_config both include
and library dirs. I have also used -lpq. Still I get errors

A3.o(.text+0x1e): In function `main':
: undefined reference to `PQconnectdb'
A3.o(.text+0x2c): In function `main':
: undefined reference to `PQstatus'
collect2: ld returned 1 exit status

I have the library installed from the debian package

ldconfig -v | grep pq
   libpq.so.3 -> libpq.so.3.1

I'm using libpq-fe.h 

Thank you

pgsql-interfaces by date

Next:From: Wolfgang KellerDate: 2005-03-07 06:39:53
Subject: Re: [NOVICE] Python modules for PL/Python?
Previous:From: Michael FuhrDate: 2005-03-06 19:26:32
Subject: Re: [NOVICE] Python modules for PL/Python?

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