Re: Cannot build static libraries under mingw



On Mon, 2008-11-10 at 21:05 +0400, Alexander Shaduri wrote:
> On Mon, 10 Nov 2008 17:52:22 +0100
> Armin Burgmeier <armin arbur net> wrote:
> 
> > On Sun, 2008-11-09 at 21:16 +0400, Alexander Shaduri wrote:
> > > Hello,
> > > 
> > > I'm having trouble building static glibmm with mingw
> > > cross-compiler (linux build, windows target).
> > > No problems with shared DLLs so far.
> > > 
> > > The configure line is
> > > ./configure --disable-shared --enable-static --target=i386-mingw32msvc \
> > > --host=i386-mingw32msvc --build=i686-linux --prefix=/opt/cross-tools
> 
> > I don't think building gtkmm or glibmm as a static library is supported,
> > and I don't know anybody who had success with this. Is there a specific
> > reason why you can't simply use shared libraries?
> 
> Well, I was hoping that the size of my statically linked exe would
> be less than total size of all gtkmm dlls + my exe. Makes distribution
> easier under windows. And I can't use the shared gtkmm installer,
> because I'm using mingw's gcc 4.3, which is binary-incompatible
> with gcc 3.4 (which the dlls in gtkmm installer seem to be built with).
> Shared gtk installer doesn't have this problem (no C incompatibility
> there).
> 
> Are you sure it's not supported as in "won't work, no matter how
> you try"?

It's not supported as in "There's no official guarantee that it will
work. It might or might not."

> Because, if I understand it correctly, it's a purely windows-specific
> problem, solvable by adjusting the build system and macros to
> not define some of the windows dll magic. Unfortunately, I lack the
> skills needed to produce a patch (gtkmm's autotools stuff seems to be
> beyond my grasp).

I won't have a look at this myself as I don't think it would be a big
gain to allow static linking. But surely a patch would be considered.

> Thanks,
> Alexander

Armin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]