This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Mingw-users] dllimport question


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 <iostream>
> >   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<char, std::char_traits<char>, std::allocator<char>>::_S_empty_rep_storage
	std::basic_string<...>::_Rep::_S_terminal
	std::basic_string<...>::_Rep::_S_max_size

Any suggestions?

Paul Kienzle
pkienzle@nist.gov	


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]