gtkvaladeblaunchpad

gtk+-3.0 not found issue


I'm writing program using Vala language. When I try to build a .deb package on Launchpad, I get this errorerror

CMake can't find valac package gtk+-3.0. It uses valac version 0.30. Though it does find it, when I do this on my computer (use cmake to build).

This is first time I try to build .deb package, so I'm a bit confused with what to do... Can anyone tell me how to fix this? Thanks in advance.


Solution

  • The error is quite clear, CMake can't find the pkg-config package named 'gtk+-3.0'.

    You have to install the Ubuntu package containing the gtk+-3.0.pc file (which is libgtk-3-dev) in order to compile and link against the libgtk+-3.0 library.

    In fact pkg-config is available in many Linux distributions and it always looks for the gtk+-3.0.pc file in it's search path. The package containing this file (and the development headers and libraries) may be named differently on differnt Linux distros.

    While we are talking about Vala: The valac compiler also has a command line switch named --pkg (e.g. --pkg gee-0.8 --pkg gtk+-3.0) which uses the pkg-config to determine the necessary headers and libs to build against libraries that come with a .pc file.