From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16453 invoked by alias); 29 Jan 2003 07:58:40 -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 16444 invoked from network); 29 Jan 2003 07:58:39 -0000 Received: from unknown (HELO jazz.ncnr.nist.gov) (129.6.120.31) by 172.16.49.205 with SMTP; 29 Jan 2003 07:58:39 -0000 Received: (from pkienzle@localhost) by jazz.ncnr.nist.gov (SGI-8.9.3/8.9.3) id CAA34011; Wed, 29 Jan 2003 02:58:36 -0500 (EST) Date: Wed, 29 Jan 2003 07:58:00 -0000 From: Paul Kienzle To: Danny Smith Cc: gcc-help@gcc.gnu.org Subject: Re: [Mingw-users] dllimport question Message-ID: <20030129025836.A7325425@jazz.ncnr.nist.gov> References: <20030128123641.H6924007@jazz.ncnr.nist.gov> <000a01c2c736$24095cf0$9c98a7cb@DANNY> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <000a01c2c736$24095cf0$9c98a7cb@DANNY>; from dannysmith@clear.net.nz on Wed, Jan 29, 2003 at 01:31:24AM +0000 X-SW-Source: 2003-01/txt/msg00267.txt.bz2 On Wed, Jan 29, 2003 at 01:31:24AM +0000, Danny Smith wrote: > > > I'm using g++ under windows to create some separately > > loadable modules for GNU Octave. As it stands, libstdc++ > > is linked statically and each module huge. To reduce the > > dll size, I've been trying to create a dll version of > > libstdc++. > > > > Using dlltool, this isn't too hard, though I do have to > > use the following in my source: > > #include > > namespace std { > > __declspec(dllimport) ostream cout; > > } ; > > > Change this to > > extern __declspec(dllimport) ostream cout; > ^^^^^^ > cout is an object. > > With more recent GCC , the extern is supplied implicitly when dllimport > is used in declaration. With 3.2.0 it is not. Thanks! Works like a charm. Now all I have to do is figure out what to do with the following variables: vtable for __cxxabiv1::__si_class_type_info vtable for __cxxabiv1::__class_type_info std::basic_string, std::allocator>::_S_empty_rep_storage std::basic_string<...>::_Rep::_S_terminal std::basic_string<...>::_Rep::_S_max_size Any suggestions? Paul Kienzle pkienzle@nist.gov