Re: Gtk and C++ ?
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: Gtk and C++ ?
- Date: 19 Oct 1999 15:35:10 -0400
Matt Goodall <mgg@isotek.co.uk> writes:
> > and when I use gcc to compile, it raises the following error :
> >
> > hellogtk.cpp: In function `int main(...)':
> > hellogtk.cpp:21: ANSI C++ forbids implicit conversion from `void *' in
> > argument passing
>
> The problem is that glib defines NULL like this:
>
> #define NULL ((void*) 0)
>
> but gtk_signal_connect_object expects a GtkObject* as the last
> parameter. Either cast the NULL to a GtkObject* or just use 0 (zero)
> instead.
Or, (until we fix this) the easy workaround is
#define NULL 0
#include <gtk/gtk.h>
Since the redefinition is in a #ifndef.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]