问题
I am trying to create Vala program with WebKit. Here is how I compile it:
valac --pkg gtk+-3.0 --pkg granite --pkg glib-2.0 --pkg webkitgtk-3.0 <filenames>
and in one file I included WebKit:
using WebKit;
The compiler says:
fatal error: webkit/webkit.h: No such file or directory
#include <webkit/webkit.h>
I heard that this file should be in /usr/include/webkit/webkit.h, but it isn't there.
I'm using elementary OS Freya x64.
Can you tell me which packages I need to install or what else I need to do? I already have libwebkitgtk-3.0-0, libwebkitgtk-3.0-common and libwebkit2gtk-3.0-25 installed.
回答1:
You also need libwebkitgtk-dev
. In general, you're always going to need a corresponding -dev
package for each of the --pkg
options.
回答2:
Actually I think I figured it out. I have somehow disabled Ubuntu main repository and apt-get was trying to download libwebkitgtk-3.0-dev from ppa:webkit-team, where it has version 1.8 and was not compatible with my other packages. Enabling main repository and removing ppa:webkit-team fixed this.
来源:https://stackoverflow.com/questions/26400755/webkit-webkit-h-no-such-file-or-directory