weberc2
weberc2

Reputation: 7908

Vala can't find gtk+-3.0 Ubuntu 12.04

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?

Upvotes: 1

Views: 2615

Answers (2)

Charababis
Charababis

Reputation: 1

Easy just run :

sudo apt-get install gtk+-3.0-dev

Upvotes: 0

weberc2
weberc2

Reputation: 7908

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.

Upvotes: 1

Related Questions