Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5BDYCE78744 for ; Mon, 11 Jun 2001 09:34:12 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from sequence.molsci.org (sequence.molsci.org [209.157.4.66]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f55ILOE30962 for ; Tue, 5 Jun 2001 14:21:25 -0400 (EDT) (envelope-from kzhou@molsci.org) Received: from molsci.org (hidden-user@firewall.neomorphic.com [205.217.46.68]) by sequence.molsci.org (8.9.3/8.9.3) with ESMTP id LAA13009 for ; Tue, 5 Jun 2001 11:20:57 -0700 Message-ID: <3B1D2201.FDE24D0A@molsci.org> Date: Tue, 05 Jun 2001 11:16:33 -0700 From: Kemin Zhou X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: difficulty building the C++ interface Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/45 X-Sequence-Number: 1708 I am having a lot of trouble in building the C++ interface to 7.1 I could build it. But when I tried to build the test programs I have to add #inlcude to my source code because the libpq++ depends on libpq. The objects of libpq++ does not include libpq-fe. I could build my test program with the follwing makefile Here is the first few lines of the test file ========================= #include #include #include #include int main() { char state_code[3]; char query_string[256]; PgDatabase data("dbname=testdb");; ====================================== Here is the makefile: HEADERDIR= /usr/local/pgsql/include LIBPQDIR= /usr/local/pgsql/lib CXXFLAGS= $(CFLAGS) CXXFLAGS+= -I $(HEADERDIR) LDFLAGS+= -L $(LIBPQDIR) -lpq++ -lpq testlpq : tlibpq.cpp g++ $(CXXFLAGS) -o $@ $? $(LDFLAGS) ================== make went well But I got this message: when run the binary [kzhou@rabbit testpgsql]$ testlpq testlpq: error in loading shared libraries: libpq++.so.3: cannot open shared object file: No such file or directory my /usr/local/pgsql/lib dir apparently has all these files [kzhou@rabbit lib]$ ls libecpg.a libpgeasy.a libpq++.a libpq.a plpgsql.so libecpg.so libpgeasy.so libpq++.so libpq.so libecpg.so.3 libpgeasy.so.2 libpq++.so.3 libpq.so.2 libecpg.so.3.2.0 libpgeasy.so.2.1 libpq++.so.3.1 libpq.so.2.1 Can someone give me some help? Is the C++ inter face in a usable format? Should I waste time on this interface? Kemin