Re: [gtkmm] Build error using jhbuild



On Sa, 2004-06-19 at 17:15 -0400, Marcus Brubaker wrote:
> The problem has persisted up to todays CVS build.  I managed to work
> around it by changing the static_casts to C style type casts which
> compiles at least.  Functionally, it shouldn't be any different.  I'm
> not sure why it wasn't working though.  It even gave the same error with
> reinterpret_casts so it almost has to be a compiler bug.

It's a gtkmm bug, actually.  You cannot static_cast<> directly from one
enum type to another -- apparently g++ 3.3 is buggy and accepts it.  The
fix just went into CVS:

	* gtk/src/widget.ccg (Widget::unset_fg): First cast Gtk::StateType
	to int and then to GtkStateType, because direct static_cast<> from
	one enum type to another is invalid C++.  Why g++ 3.3 accepts this
	is a mystery to me though...
	(Widget::unset_bg): ditto
	(Widget::unset_text): ditto
	(Widget::unset_base): ditto.

(I'm not sure though why reinterpret_cast<> didn't work for you -- that
might indeed be a compiler bug.)

Cheers,
--Daniel





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