本文介绍了无法在 ubuntu 上安装 pango的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 ubuntu 上构建 gtk+1.3,但在配置过程中出现错误,

I'm trying to build gtk+1.3 on ubuntu and I'm getting an error during configure,

ld: cannot find -lpango

我尝试安装大量 pango 库,但仍未安装,所以我不知道该怎么做.我一直在用

I tried installing a ton of pango libraries and its still not installed so I'm not sure what to do. I keep testing it with

ld -lpango

但得到同样的错误.有没有人在 ubuntu 上成功安装了预先构建的 pango?从任何回购?Pango 网站说它很难构建,如果可能,我想使用预构建的二进制文件.

But get the same error. Has anyone successfully installed a pre-built pango on ubuntu? From any repos? Pango website says its difficult to build and I'd like to use a prebuilt binary if possible.

我还有一个错误,找不到 atk,但我所要做的就是安装 libatk1.0* 并修复了.

Also I had an error with atk not being found but all I had to do was install libatk1.0* and that was fixed.

推荐答案

-lpango 不是正确的库名称.

事实上,您不应该直接使用 -l 选项来链接 Pango.相反,您应该使用 pkg-config:

In fact, you should not be using -l options directly to link against Pango. Instead, you should be using pkg-config:

gcc -c -o program.o program.c `pkg-config --cflags pango`
gcc -o program program.o `pkg-config --libs pango`

gcc -o program program.c `pkg-config --cflags --libs pango`

由于这是调试一个损坏的configure 脚本,您可以直接运行pkg-config 来查看它应该是什么:

Since this is debugging a broken configure script, you can run pkg-config directly to see what it should be:

$ pkg-config --libs pango
-lpango-1.0 -lgobject-2.0 -lglib-2.0

坦率地说,我很惊讶 GTK+ 的配置文件也没有这样做;您应该提交错误报告.

Frankly I'm surprised GTK+'s configure file doesn't also do this; you should file a bug report.

这篇关于无法在 ubuntu 上安装 pango的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 09:08