Compile error with clang++



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

Attachment: actiongroup_clang.patch
Description: Text Data



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