gtk+-3.0 not found issue

跟風遠走 提交于 2019-12-11 12:57:42

问题


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

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.


回答1:


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.



来源:https://stackoverflow.com/questions/38050294/gtk-3-0-not-found-issue

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