From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26134 invoked by alias); 14 Jun 2004 20:05:24 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 26113 invoked from network); 14 Jun 2004 20:05:20 -0000 Received: from unknown (HELO mgr3.xmission.com) (198.60.22.203) by sourceware.org with SMTP; 14 Jun 2004 20:05:20 -0000 Received: from [198.60.22.202] (helo=mgr2.xmission.com) by mgr3.xmission.com with esmtp (Exim 4.32) id 1BZxhm-0003uB-Sd; Mon, 14 Jun 2004 14:05:19 -0600 Received: from [198.60.22.130] (helo=mgr10.xmission.com) by mgr2.xmission.com with esmtp (Exim 3.35 #1) id 1BZxhm-0005WP-02; Mon, 14 Jun 2004 14:05:18 -0600 Received: from [166.70.238.3] (helo=xmission.xmission.com) by mgr10.xmission.com with esmtp (Exim 4.32) id 1BZxhm-00014C-Rk; Mon, 14 Jun 2004 14:05:18 -0600 Received: from llewelly by xmission.xmission.com with local (Exim 3.35 #1 (Debian)) id 1BZxhm-00074m-00; Mon, 14 Jun 2004 14:05:18 -0600 To: Ingolf Steinbach Cc: gcc-help@gcc.gnu.org References: <200406111353.59756.ingolf.steinbach@jena-optronik.de> <200406140915.54787.ingolf.steinbach@jena-optronik.de> From: llewelly@xmission.com Date: Mon, 14 Jun 2004 20:05:00 -0000 In-Reply-To: <200406140915.54787.ingolf.steinbach@jena-optronik.de> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Subject: Re: C++ code with external C API --> static library? Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mgr3.xmission.com X-Spam-Level: X-Spam-Status: No, hits=-4.7 required=8.0 tests=BAYES_00,NO_REAL_NAME autolearn=no version=2.63 X-SA-Exim-Connect-IP: 198.60.22.202 X-SA-Exim-Mail-From: llewelly@xmission.com X-SA-Exim-Version: 4.0 (built Sat, 24 Apr 2004 12:31:30 +0200) X-SA-Exim-Scanned: Yes (on mgr3.xmission.com) X-SW-Source: 2004-06/txt/msg00136.txt.bz2 Ingolf Steinbach writes: > On Friday 11 June 2004 18:50, llewelly@xmission.com wrote: > > > 4. A user shall be able to use the library with gcc without > > > having to know that the library is implemented in C++ > > > (i.e. the library must not reference unresolved C++ related > > > symbols; all these symbols have to be resolved when the > > > library is created). > > > > For this, you'll need to link libstdc++ and libsupc++ to the library > > staticly. > > Thank you for your comments. > > Any suggestions wrt the correct invocation of g++ to achieve > this? I don't remember, and I can't seem to make time to test it out. I think -static. > (Note: of course, I'd prefer to only include those parts > of the stdc++ and supc++ libraries which are really needed.) > > > > 5. Only symbols from the C language API are to be exported > > > by the library. No internal symbols shall be visible. > > I found some remarks on selecting the set of exported symbols > in the GNU ld info pages, but maybe I still got something > wrong (as there still are other symbols in the resulting library). > What is the correct way to do this? I'm sorry, I don't know.