Re: GNOME GTK-- Projects



On Mon, 1 Jun 1998, Erik Andersen wrote:
> On Mon, 1 Jun 1998, Michael Hudson wrote: 
> > 
> > Did you read my post?
> > If not why did you quote it?
> > Unless you compile GTK+ in C++, there's no guarantee that exceptions will
> > be able to propgate through the GTK+ code.
> [-------snip-------------]
> > 
> > Michael Hudson
> 
> Sorry about not directly responding.  I guess I got so excited with
> quickly designing a Gtk+ interface for configurable error handling, I forgot
> to reply to the issue at hand. 
> 
> You are correct and this is something I had not given a great deal of thought
> to.  This can be handled though.  See:
> 
> 	http://www.cygnus.com/ml/egcs-bugs/1998-Apr/0483.html
> 
> and the follow-up post:
> 
> 	http://www.cygnus.com/ml/egcs-bugs/1998-Apr/0490.html
> 
> from the egcs mailing list on the subject.  If Gtk+ is compiled with
> "gcc -fexceptions" (or is compiled with a C++ compiler) all should be well.
> Even if folks think that compiling Gtk+ with a C++ compiler is evil, perhaps
> not too many folks will have heartburn over "gcc -fexceptions"???  I don't
> know if Gtk+ requires gcc (pgcc, egcs, etc...) or not at this point, but
> this feature would probably require that though...  :-(

Aha! Hard fact (well almost).
So one can make it work using gcc. I sort of suspected that was possible.
That wasn't my point, really. Is it a good idea to tie gnome/gtk to gcc? I
don't think so myself.
FWIW, I compiled Gtk+ with g++, and my computer is still working, so far
as I can tell. The libraries have gotten  bigger though ~2.1M -> ~3.5M.

A brief rant:
GTK+ is written in C, for reasons I understand and agree with.
However it is pretty new code, so why do people use C++ keywords all over
it? 
Come on, that's avoidable.
I had to compile gdk with -Dclass=klass -Dprivate=Private on the CFLAGS,
and fart around with extern "C" declarations quite a bit.
It generated thousands of warnings, mostly from uncasted conversions from
void* to other pointers, but I can live with those.

Michael Hudson
Jesus College
Cambridge
mwh21@cam.ac.uk





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