我正在尝试在 ArchLinux 上编译一些 Vala,当我尝试包含 packagegtk+-3.0
时,似乎 GDK 和 GTK+ 2.0 也被包含在内;valac --pkg gtk+-3.0 test.vala
给出以下错误:
gdk-2.0.vapi:8.3-8.28: error: `Gdk.Selection' already contains a definition for `convert'
public static void convert (Gdk.Window requestor, Gdk.Atom selection, Gdk.Atom target, uint32 time_);
^^^^^^^^^^^^^^^^^^^^^^^^^^
gdk-3.0.vapi:8.3-8.28: note: previous definition of `convert' was here
public static void convert (Gdk.Window requestor, Gdk.Atom selection, Gdk.Atom target, uint32 time_);
^^^^^^^^^^^^^^^^^^^^^^^^^^
gdk-2.0.vapi:10.3-10.44: error: `Gdk.Selection' already contains a definition for `owner_get'
public static unowned Gdk.Window owner_get (Gdk.Atom selection);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gdk-3.0.vapi:10.3-10.44: note: previous definition of `owner_get' was here
public static unowned Gdk.Window owner_get (Gdk.Atom selection);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--snip--
Compilation failed: 942 error(s), 0 warning(s)
有没有办法指定不包括gtk+-2.0
或valac
忽略这些错误?