glib2 G_GNUC_UNUSED

Elan Ruusamäe glen at delfi.ee
Thu Nov 16 11:51:27 CET 2006


if somebody help solving this problem, could continue compiling ooo2 for ac

On Friday 03 November 2006 02:21, Elan Ruusamäe wrote:
> is glib2 defining the macro incompatible for gcc in Ac, or there's some
> other cause?
>
> $ g++ -c t.c `pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0`
> t.c:5: error: syntax error before `__attribute__'
>
> $ cat t.c
> #include <gtk/gtk.h>
> #include <glib.h>
>
> static void open_url_cb( GtkWidget *pButton G_GNUC_UNUSED, gpointer data )
> {
> }
>
> $ g++ -E t.c `pkg-config --cflags glib-2.0` `pkg-config --cflags
> gtk+-2.0`>t.C $ grep open_url_cb t.C
> static void open_url_cb( GtkWidget *pButton __attribute__((__unused__)),
> gpointer data )
>
> $ q gcc glib2 gtk+2
> gcc-5:3.3.6-4
> glib2-1:2.10.3-1
> gtk+2-2:2.8.20-1
> $
>
> http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Macros.html#
>G-GNUC-UNUSED:CAPS

-- 
glen


More information about the pld-devel-en mailing list