分类: LINUX
2011-12-12 16:04:37
. 下载相应文件
从上下载下面文件
libminigui-1.6.10.tar.gz
mg-sample-1.6.10.tar.gz
minigui-res-1.6.10.tar.gz
qvfb-1.1.tar.gz
1. 安装qvfb和minigui
解压安装
先在目录上建立minigui文件夹
jing@jing-desktop:~$ mkdir minigui
j jing@jing-desktop::~$ cd minigui
将所有文件放到minigui文件夹中
a. 安装qvfb
先安装qt3-dev-tools-embedded , libqt3-headers and libqt3-mt-dev
如果没有的话,会出错 Can't find X includes 以及error: Qt (>= Qt 3.0.3) (headers and libraries) not found 等错误
sudo apt-get install qt3-dev-tools-embedded
sudo apt-get install libqt3-headers libqt3-mt-dev
解压
jing@jing-desktop:~/minigui$ tar zxvf qvfb-1.1.tar.gz
jing@jing-desktop:~/minigui$ cd qvfb-1.1/
配置
jing@jing-desktop:~/minigui/qvfb-1.1$
./configure --with-qt-includes=/usr/share/qt3/include
--with-qt-libraries=/usr/share/qt3/lib/
编译
jing@jing-desktop:~/minigui/qvfb-1.1$ make -j4
安装
jing@jing-desktop:~/minigui/qvfb-1.1$ sudo make install
b. 安装资源文件
解压
jing@jing-desktop:~/minigui$ tar zxvf minigui-res- 1.6.10.tar.gz
jing@jing-desktop:~/minigui$ cd minigui-res-1.6.10
安装
jing@jing-desktop:~/minigui/minigui-res-1.6.10$ sudo make install
c. 配置安装MiniGUI
解压
jing@jing-desktop:~/minigui$ tar zxvf libminigui-1.6.10.tar.gz
jing@jing-desktop:~/minigui$ cd libminigui-1.6.10/
配置
jing@jing-desktop:~/minigui/libminigui-1.6.10$ ./configure
编译
jing@jing-desktop:~/minigui/libminigui-1.6.10$ make
安装
jing@jing-desktop:~/minigui/libminigui-1.6.10$ sudo make install
vi /etc/ld.so.conf 在最后添加一行 /usr/local/lib 然后:wq保存推出
vi /usr/local/etc/Minigui.cfg 把输入fbcon输出console都改为qvfb 然后保存退出
ldconfig
2. 测试
使用mg-sample-1.6.10.tar.gz进行
解压
jing@jing-desktop:~/minigui$ tar zxvf mg-samples-1.6.10.tar.gz
jing@jing-desktop:~/minigui$ cd mg-samples-1.6.10/
配置
jing@jing-desktop:~/minigui/mg-samples-1.6.10$ ./configure
编译
jing@jing-desktop:~/minigui/mg-samples-1.6.10$ make
jing@jing-desktop:~/minigui/mg-samples-1.6.10$ cd src
运行
jing@jing-desktop:~/minigui/mg-samples-1.6.10$ qvfb &
jing@jing-desktop:~/minigui/mg-samples-1.6.10$ ./helloworld
附:遇到的问题
A. 配置时
error: Can't find X includes. Please check your installation and add the correct paths!
solution: sudo apt-get install qt3-dev-tools-embedded
B. 配置时
checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log
solution: 1. sudo apt-get install libqt3-headers libqt3-mt-dev
2. ./configure --with-qt-includes=/usr/share/qt3/include --with-qt-libraries=/usr/share/qt3/lib/
3. make -j4
4. sudo make install
C. 运行例子时
NEWGAL: Video mode smaller than requested.
NEWGAL: Set video mode failure.
InitGUI (step 4): Can not initialize graphics engine!
solution: 1. 修改 sudo vi /usr/local/etc/MiniGUI.cfg
中
[qvfb]
defaultmode=240x320-16bpp
2. 重启
D.运行出错
loading shared libraries: libminigui-1.6.so.10: cannot open shared object file: No such file or directory
solution: 在完成配置安装minigui后,输入
vi /etc/ld.so.conf 在最后添加一行 /usr/local/lib 然后:wq保存推出
vi /usr/local/etc/Minigui.cfg 把输入fbcon输出console都改为qvfb 然后保存退出
ldconfig
E.配置configure出错
C++ preprocessor "/lib/cpp" fails sanity check
sulotion:sudo apt-get install build-essential
sudo ldconfig
http://blog.163.com/lzh_327/blog/static/72194802010521105850695/