【发布时间】:2011-06-17 21:57:14
【问题描述】:
我正在尝试在 ArchLinux 上编译一些 Vala,当我尝试包含包 gtk+-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 忽略这些错误?
【问题讨论】:
标签: gnome gtk3 vala gnome-3 vapi