Vala can't find gtk+-3.0 Ubuntu 12.04

放肆的年华 提交于 2019-12-11 09:24:16

问题


I'm just starting to learn Vala (under Ubuntu 12.04), and I'm attempting to follow this tutorial; however, at the very first compilation step (valac --pkg gtk+-3.0 gtktut.vala), I receive this error:

error: gtk+-3.0 not found in specified Vala API directories or GObject-Introspection GIR directories

I can't seem to find any information about this on the Internet except that it may mean I don't have the GTK3 .vapi file (there is none in my /usr/share/vala/vapi directory); however, I can't find out where I should even download this mythical file if it even is the cause of my problem. Supposedly it's supposed to be included with my installation of the vala compiler.

Again, I'm a complete novice when it comes to compiled languages and I've tried my best to find the answer.

How can I point valac to the necessary gtk3 packages?

UPDATE:

I found the gtk+-3.0.vapi does exist in /usr/share/vala-0.16/vapi; however, it still isn't being found. Any ideas?


回答1:


I found the problem. It seems for some reason valac-0.16 isn't capable of using its own GTK+3.0 vapi file or something like that. I updated my sources and installed valac-0.18 and it worked fine.



来源:https://stackoverflow.com/questions/10644425/vala-cant-find-gtk-3-0-ubuntu-12-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!