Skip to content

Syntax error when parsing webkitgtk header file #615

@BenjaminKnecht

Description

@BenjaminKnecht

V version: V 0.5.0 9828cd8
UI version: 0.0.4
OS: Ubuntu 24.04

What did you do?

  1. Try to run webview example from https://github.com/vlang/ui/blob/master/examples/webview.v
  2. Since libwebkit2gtk4.0 is no longer available on my Ubuntu version (it was upgrade to 4.1) I was trying to be clever and change the pkgconfig in ~/.vmodules/ui/webview/webview_linux.c.v to use version 4.1
  3. run v run main.v where I had copied the webview example.

What did you expect to see?

I was hoping the example would compile and run with V finding the correct version of Webkit now.

What did you see instead?
I got this error instead:

In file included from /tmp/v_1000/main.01KH39AQHE8MBKRMRDHHRFT6XD.tmp.c:1076:
In file included from /usr/include/webkitgtk-4.1/webkit2/webkit2.h:38:
/usr/include/webkitgtk-4.1/webkit/WebKitContextMenuItem.h:56: error: ',' expected (got "*")
builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,

The relevant lines in the header file:

 53 WEBKIT_DECLARE_FINAL_TYPE (WebKitContextMenuItem, webkit_context_menu_item, WEBKIT, CONTEXT_MENU_ITEM, GInitiallyUnowned)
 54
 55 WEBKIT_DEPRECATED_FOR(webkit_context_menu_item_new_from_gaction) WebKitContextMenuItem *
 56 webkit_context_menu_item_new                              (GtkAction              *action);
 57 
 58 WEBKIT_API WebKitContextMenuItem *
 59 webkit_context_menu_item_new_from_gaction                 (GAction                *action,
 60                                                            const gchar            *label,
 61                                                            GVariant               *target);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions