[Libpqxx-general] LD_FLAGS used when checking for libpq
Jorgen Austvik - Sun Norway
Jorgen.Austvik at Sun.COM
Fri Aug 8 12:33:25 UTC 2008
Hi,
I have had some problems building libpqxx:
--------8<--------------8<--------------8<--------------8<--------------8<------
checking for main in -lpq... no
configure: error:
Could not link to libpq. Make sure you have the PostgreSQL client library
installed, and that the library binary can be found in the location
returned by
"pg_config --libdir".
--------8<--------------8<--------------8<--------------8<--------------8<------
config.log:
--------8<--------------8<--------------8<--------------8<--------------8<------
configure:21266: /opt/studio11/SUNWspro/bin/cc -o conftest -xO3
conftest.c -lpq
-L/usr/local/postgres/version/NIGHT/SunOS_i386/usr/postgres/8.3/lib >&5
"conftest.c", line 37: warning: statement not reached
ld: fatal: library -lpq: not found
ld: fatal: File processing errors. No output written to conftest
--------8<--------------8<--------------8<--------------8<--------------8<------
The problem is that the -lpq switch is before the -L switch on the
command line.
With changes like the attached patch, the linker is told where to to
find libpg before the -lpq switch, and compilation works for me.
-J
--
Jørgen Austvik, Software Engineering - QA
Sun Microsystems Database Group
http://blogs.sun.com/austvik/
http://www.austvik.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpqxx_ldflags.patch
Type: text/x-patch
Size: 689 bytes
Desc: not available
Url : http://pgfoundry.org/pipermail/libpqxx-general/attachments/20080808/12610da8/attachment.bin
More information about the Libpqxx-general
mailing list