/usr/bin/ld: cannot find -lpq

From: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: /usr/bin/ld: cannot find -lpq
Date: 2009-12-04 02:25:47
Message-ID: C73DB32B.914A%tsakai@gallo.ucsf.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Everybody,

I am not sure if this is the right mailing list to ask
what I want to ask. Please direct me to the right place,
if there is a better list.

Close to a year ago, I wrote a C program using libpq package.
It took me a week to debug, but I got it compiled and I have
been using it regularly. The program is named pivot and compiled
on a Redhat linux (AMD 64-bit) machine with the command:

cc -I/pgsql/pgsql836/include -L/pgsql/pgsql836/lib -lpq -o pivot pivot.c

And I just tried recompiling it on that machine and it compiles without a
complaint. I now need to re-compile it on a Intel 32-bit machine running
centOS. When I issue the same command on the centOS machine, I get
complaint:
/usr/bin/ld: cannot find -lpq
collect2: ld returned 1 exit status

I thought that this meant that the shared library named libpq.so.bla
is missing. But to my surprise, I find libpq.so.4.1 in /usr/lib
directory. (There is also a symbolic link libpq.so.4 pointing at
libpq.so.4.1 in the same place.)

So, I don't know what the complaint is about.

Can someone please clue me in?

Thank you in advance.

Regards,

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tena Sakai 2009-12-04 04:00:19 /usr/bin/ld: cannot find -lpq
Previous Message John Lister 2009-12-03 18:04:52 Re: