[9562] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Gtk--: gcc2.7.2 abandoned?

daemon@ATHENA.MIT.EDU (Tero Pulkkinen)
Sun Oct 25 23:26:49 1998

To: gtk-list@redhat.com
From: Tero Pulkkinen <terop@students.cc.tut.fi>
Date: 26 Oct 1998 06:25:39 +0200
In-Reply-To: Olof Oberg's message of "Mon, 26 Oct 1998 02:45:33 +0100"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Olof Oberg <mill@pedgr571.sn.umu.se> writes:
> I have been trying to get gtk-- to compile this weekend (I need it 
> for an assignment due soon). 
> 
> I have installed gtk+ from CVS (compiled without any problems). 
> Gtk-- on the other hand gives a warning

> configure: warning: Test for member templates failed. This disables some 
> methods that requires member template support. If your compiler should support 
> member templates, see config.log to figure out why the test failed.

This is okay. It'll just disable some methods in gtk--.

> and then when I run make
> 
> creating src/gtk--/Makefile
> make[4]: Leaving directory `/old/work/GTK/gtk--/src/gtk--'
> make[4]: Entering directory `/old/work/GTK/gtk--/src/gtk--'
> /bin/sh ../../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../.. 
> -I../../src -DG_LOG_DOMAIN=\"Gtk--\" -I. -I. -I./.. -I.. -I/usr/X11R6/include 
> -I/usr/local/lib/glib/include -I/usr/local/include  -g -O2 -c gtk--.cc
> c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -DG_LOG_DOMAIN=\"Gtk--\" -I. 
> -I. -I./.. -I.. -I/usr/X11R6/include -I/usr/local/lib/glib/include 
> -I/usr/local/include -g -O2 -Wp,-MD,.deps/gtk--.p -c -fPIC -DPIC gtk--.cc
> In file included from ../../src/gtk--.h:197,
>                  from gtk--.cc:31:
> ./../base.gen_h:221: declaration of `template <> Gtk_ObjectHandle<OBJECT>
> ::Gtk_ObjectHandle(const OBJECT *)' in non-template type 
> `Gtk_ObjectHandle<OBJECT>'

oh, this is because 2.7.2. doesnt understand completely valid syntax for
templates to define the body outside the class... The fix is to move
the implementations inside the template class(==inline) for 2.7.2.
(I think we should do that anyway, it works on more compilers :)

I fixed this to cvs tree. (I wonder how many other places like this
there exists already :)

> I don't have the time to move to egcs or gcc2.8 at the time so 
> anyone got any ideas?

hope this helps.

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post