Re: /usr/bin/ld: cannot find -lpq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tena Sakai wrote:
> Hi Tom,
> 
> Please ignore what I wrote before.  I got it.  I mean I got it compiled
> successfully on the centOS machine.  I was stupid and blind.  In order
> to compile, I created an alias for cc with long string for include and
> lib directories.  Which was not a bad idea, but I had a typo in my
> alias.  Therefore it didn't find the libpq-fe.h file and I screwed that
> up even worse by supplying desired files in the current directory
> from the other machine.  I corrected the alias, removed the header
> files in the source directory, and then compilation went smoothly and
> I can now test the program.

FWIW you should always prefer pg_config to help you get the right
compile flags; something like 

gcc -I`pg_config --includedir` -L`pg_config --libdir` -lpq ...

That gets you the right include and lib dirs.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux