Re: Compile error with clang++



This bug has been reported and fixed in the bug report
https://bugzilla.gnome.org/show_bug.cgi?id=709963
but the fix is not yet included in a glibmm release.

Kjell

2013-11-18 03:54, creak ml skrev:
Hi!

I was just trying to use clang++ to compile my gtkmm application and I went to this error:

    In file included from /usr/include/gtkmm-3.0/gtkmm/drawingarea.h:28:
    In file included from /usr/include/gtkmm-3.0/gtkmm/widget.h:56:
    /usr/include/giomm-2.4/giomm/actiongroup.h:618:50: error: const_cast from 'const GActionGroup *'
          (aka 'const _GActionGroup *') to 'GAction *' (aka '_GAction *') is not allowed
        g_variant_type_equal(g_action_get_state_type(const_cast<GAction*>(gobj())), type_glib_va...
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gmessages.h:340:18: note: expanded from macro 'g_return_if_fail'
         if G_LIKELY(expr) { } else                                         \
                     ^
    /usr/include/glib-2.0/glib/gmacros.h:315:59: note: expanded from macro 'G_LIKELY'
    #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1))
                                                              ^
    /usr/include/glib-2.0/glib/gmacros.h:309:8: note: expanded from macro '_G_BOOLEAN_EXPR'
       if (expr)                                    \
           ^
    1 error generated.

So I simply tried to found how to make it work and here is a patch.
But since I'm completely new to GTK I've got no idea if it's a good solution.

Hope it helps though.
Cheers,
Romain "Creak" Failliot



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



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