哪个缺少的库会导致消息“/usr/bin/ld:找不到 -lglib-2.0”?

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

我正在交叉编译一个 Lazarus 程序,在 64 位 Ubuntu 14.04 Trusty Tahr 系统上创建一个 32 位程序,当我收到这条消息时,一切显然都编译到了最后

/usr/bin/ld: cannot find -lglib-2.0

缺少导致此错误消息的库的全名是什么?

libc6-dev:i386 似乎是最有可能的库,但是当我尝试使用 apt 安装它时表明 build-essential g++ gcc gcc-multilib 将被删除,所以我中止了它。

sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  linux-libc-dev linux-libc-dev:i386
Suggested packages:
  glibc-doc:i386 manpages-dev:i386
Recommended packages:
  gcc:i386 c-compiler:i386
The following packages will be REMOVED
  build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
  libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
  linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

原来是libglib2.0-0:i386包。之前已经安装好了,只是还没有完全配置好。

它存在于 /lib/i386-linux 目录中,我必须创建一个指向它的符号链接,将其包含到 Free Pascal 使用的 fpc.cfg 配置文件中。

locate libglib | grep ^/lib出品:

/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0

我将它与预期的名称进行了符号链接:

ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so

然后添加到 Lazarus 安装 fpc.cfg 文件

#ifdef cpui386
 -Fl/usr/lib32
 -Fl/lib/i386-linux-gnu
#endif