I am using webkit2gtk
in my Vala program to show some pages to the user and webkit2gtk-web-extension
to manage DOM. But I can't use these 2 packages at the same time because of the build error. When I add these 2 packages to the cmake
system, it shows this error:
webkit2gtk-web-extension-4.0.vapi:2619.2-2619.38: error: `WebKit' already contains a definition for `URIRequest'
public class URIRequest : GLib.Object {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
webkit2gtk-4.0.vapi:488.2-488.38: note: previous definition of `URIRequest' was here
public class URIRequest : GLib.Object {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
webkit2gtk-web-extension-4.0.vapi:2628.2-2628.39: error: `WebKit' already contains a definition for `URIResponse'
public class URIResponse : GLib.Object {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
webkit2gtk-4.0.vapi:497.2-497.39: note: previous definition of `URIResponse' was here
public class URIResponse : GLib.Object {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If I remove one of the packages from the CMakeLists.txt
, either WebKit.WebView or WebKit.Webpage is not found.
Maybe this is caused by the fact that I build the webkit2gtk-4.0
package myself and didn't use the repositories version, I don't know.
So, the question: how to manage it?