现在把libxml++的安装过程给记录了下。我的版本libxml++-2.34.2.tar.bz2
libxml++ org http://libxmlplusplus.sourceforge.net/
系统:redhat AS5 2.6.18-164.el5
以下只是记录安装过程,和其中有些问题的解决
首先 configure libxml++ 发现系统缺少glibmm
libxml++依赖 glibmm 和 libxml2 (需要的版本见官网)
我的libxml2系统自带了,而且满足版本要求,故没有安装
而glibmm没有需要安装,先configure你的glibmm,如果完全配置,下面可以不用看了。 我的glibmm配置,发现缺乏以下库
libsigc++ glibmodule glibobject 等
我系统没有安装libsigc++ glib的库版本过低需要升级
我升级用的 glib-2.28.6.tar.bz2 (所以软件的下载在gnome官网都可以搞到) ,在安装glib前先查下有无gettext库,没有这个库,安装glib会有下面的问题l
安装时候遇到 关键字“msgctxt”未知 的错误
解决:
安装 gettext-0.17.tar.gz 来解决上述问题
gettext-0.17.tar.gz安装方法:
Download? gettext-0.17.0.tar.gz
Ekstract source, tar zxvf gettext-0.17.0.tar.gz
cd gettext-0.17.0
./configure ¨Cprefix=/opt/gnome/
make
make install
copy gettext original (as backup). I use command : mv /usr/bin/msgfmt /usr/bin/msgfmtold
copy gettext new compiled. I use command : cp /opt/gnome/bin/msgfmt /usr/bin/
check new version of gettext. Use command : msgfmt ¨Cversion
We must add library path from gettext to my system, so linux can detect new library from
source compiled. Edit your ~/.bashrc and add following text? at bottom from this file:
export GNOME_INST=/opt/gnome
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GNOME_INST/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$GNOME_INST/lib/pkgconfig
export PATH=$PATH:$GNOME_INST/bin
After this step, you must restart or logoff your system and repeat to install gnome-desktop.
安装完成gettext后,再安装glib.
完成glib库后,安装libsigc++-2.0.18, 这个库很顺利,没有依赖问题。
接着安装glibmm, 我的版本 glibmm-2.12.10.tar.bz2
./configure --prefix=/usr
make
su
make install
make 的时候出现 “g_assert error ”
解决方法:
in this dir glib/glibmm/下修改 convert.cc exception.cc error.cc date.cc 每个文件添加 #include <glib/gtestutils.h>
然后make , 安装
最后完成libxml++的安装
进入libxml++下的example 找个测试用例,运行下
libxml++
最新推荐文章于 2024-07-18 15:15:17 发布