ui icon indicating copy to clipboard operation
ui copied to clipboard

Error when compiling webview example on linux

Open ChildishGiant opened this issue 4 years ago • 2 comments

V version: V 0.2.2 639061b UI version: 0.0.4 OS: elementary OS 5.1.7 Hera

What did you do? ~/.vmodules/ui/examples$ v webview.v

What did you expect to see? Successful compile

What did you see instead?

/home/allie/.vmodules/ui/webview/webview_linux.c.v:4:3: error: Cannot find "webkit2gtk-4.0" pkgconfig file
    2 | 
    3 | #flag linux -I /usr/include/harfbuzz
    4 | #pkgconfig gtk+-3.0 webkit2gtk-4.0
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5 | #include <gtk/gtk.h>
    6 | #include <webkit2/webkit2.h>

ChildishGiant avatar Feb 25 '21 22:02 ChildishGiant

Have similar errors here. The problem lies in vlib/pkgconfig which doesn't find the .pc files.. in my file located in /usr/lib/i386-linux-gnu/pkgconfig/gtk+-3.0.pc

xandro0777 avatar Aug 21 '21 23:08 xandro0777

Unfortunately still not working in 2024 with Ubuntu 22.04.3 using v 0.4.4.

I found out at least to use these headers in webview_linux.c.v to fix the missing graphene_config.h:

#flag linux -I /usr/include/harfbuzz
#flag linux -I /usr/lib/x86_64-linux-gnu/graphene-1.0/include   
#pkgconfig gtk4     
#pkgconfig webkit2gtk-4.0
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>

Is gtk4 actually supported by webkit2gtk? As far as i see via pkg-config, it is just supporting gtk+-3.0. As i am not a C dependency hell expert, somebody with more experience could have a look on that?

dev-rke avatar Feb 05 '24 01:02 dev-rke