Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 613984767AC for ; Wed, 25 Sep 2002 09:46:46 -0400 (EDT) Received: from storm.jmc.tju.edu (storm.jmc.tju.edu [147.140.155.140]) by postgresql.org (Postfix) with ESMTP id 92EC447670E for ; Wed, 25 Sep 2002 09:46:45 -0400 (EDT) Received: from storm.jmc.tju.edu (noir.jmc.tju.edu [147.140.160.249]) by storm.jmc.tju.edu (8.11.6/8.11.2) with ESMTP id g8PDefw14709 for ; Wed, 25 Sep 2002 09:40:41 -0400 Message-ID: <3D91BE49.5050904@storm.jmc.tju.edu> Date: Wed, 25 Sep 2002 09:46:49 -0400 From: Emilio Recio Organization: Polywog Systems ( http://polywog.philtered.net ) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: Cannot Statically Link libpq.a References: <3D91B97F.6090002@storm.jmc.tju.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/77 X-Sequence-Number: 3138 Emilio Recio wrote: > libpq.a is in /usr/lib, but it's only about 93k. For the object files > that seems alot. I need to statically link the library because I am > going to be using a custom program in an embedded device where none of > the above libraries mentioned in the ldd works. All the the programs > statically link fine, except for libpq. I am using the redhat 7.3 rpms. -- New Several points to follow up on: ./configure && make && make install on slackware 8.1 also did not produce a libpq.a file which I can use for static linking. Tried (from postgresql src dir): -- Cmd Line ar r libpq.a `find /usr/local/src/postgresql-7.2.2/src |grep -v main.o` ranlib libpq.a -- And no go... can anyone tell me how to create a static library? Or which object files to copy from postgresql source code to be able to link them with testpg.c (note testpg.c can be found in the documentation for postgresql - my program is significantly smaller and uses less postgress calls.) -- Clarification ALso above, i meant, libpq.a seemed like too little, but it was 3am :) -Elmo