您的位置:首页 > 产品设计 > UI/UE

ubuntu下安装minigui

2013-06-25 11:53 239 查看
下载 libminigui-1.3.3.tar.gz      minigui-res-1.3.3.tar.gz     mg-samples-1.3.1tar.gz     qvfb2.2.0.tar.gz

1.安装minigui 库文件

   tar zxvf libminigui-1.3.3.tar.gz

   ./configure

   make

   make install

2.安装minigui资源

    tar zxvf minigui-res-1.3.3.tar.gz

   make install

3.配置minigui

   vim /usr/local/etc/MiniGUI.cfg

   gal_engine=qvfb

    ial_engine=qvfb

    mdev=/dev/mouse

4 编译应用程序例子

tar zxvf mg-samples-1.3.1tar.gz

./configure

make

5 编译应用程序例子

tar zxvf mde-1.3.0.tar.gz

./configure

make

6.安装QVFB图形引擎

    tar zxvf qvfb1.0.tar.gz     

   ./configure

   make

   make install

 

7 运行一个minigui例程

./qvfb

进入 mde-1.3.0/tools

./fminigui

遇到问题:

1.qvfb ./configure 时,遇到checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!

  解决方法: apt-get install  libqt3-mt-dev  libqt3-headers

                    ./configure --with-qt-includes=/usr/include/qt3 --with-qt-lilbraries=/usr/lib/qt3

2.make编译libminigui-1.3.3出错

(1)

varbitmap.c:248: error: static declaration of 'var_bitmap_font_ops' follows non-static declaration

varbitmap.h:38: error: previous declaration of 'var_bitmap_font_ops' was here

解决方法:

在src/font/varbitmap.h中定义了extern FONTOPS var_bitmap_font_ops,那里var_bitmap_font_ops为extern类型的,而在src/font/varbitmap.c中定义的是static类型,所以可能造成了编译的出错。

修改src/font/varbitmap.c文件:

//static FONTOPS var_bitmap_font_ops = {   

extern FONTOPS var_bitmap_font_ops = {    //  修改

(2)

rd.h:43: error: expected ')' before '*' token

keyboard.h:49: error: expected specifier-qualifier-list before 'INIT_KBD_LAYOUT'

keyboard.h:52: error: expected ')' before '*' token

defkeymap.c:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'plain_map'

defkeymap.c:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'shift_map'

defkeymap.c:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'altgr_map'

defkeymap.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ctrl_map'

defkeymap.c:93: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'shift_ctrl_map'

defkeymap.c:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'alt_map'

defkeymap.c:131: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ctrl_alt_map'

defkeymap.c:150: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

解决方法:

1 打开src/gui/defkeymap.c,将所有ushort改为u_short、
2 打开src/gui/keyboard.h,将所有ushort改为u_short,并在前面添加u_short的定义:
typedef unsigned short u_short;

(3)

fbvideo.c:19:63: error: asm/page.h: No such file or directory
fbvideo.c: In function 'FB_VideoInit':
fbvideo.c:368: error: 'PAGE_SIZE' undeclared (first use in this function)

解决方法: 包含
<unistd.h> 头文件,将 SIZE_PAGE 宏替代成 getpagesize() 函数调用。
第二种办法有更好的兼容性,也是 MiniGUI 新版本采用的方法。
        

(4)

grid.c: In fu
4000
nction 'AddCol':
grid.c:626: error: invalid lvalue in assignment
grid.c:627: error: invalid lvalue in assignment
grid.c:640: error: invalid lvalue in assignment
grid.c:641: error: invalid lvalue in assignment
grid.c:669: error: invalid lvalue in assignment
grid.c:670: error: invalid lvalue in assignment
grid.c:682: error: invalid lvalue in assignment
grid.c:683: error: invalid lvalue in assignment
grid.c: In function 'AddRow':
grid.c:735: error: invalid lvalue in assignment
grid.c:736: error: invalid lvalue in assignment
grid.c:747: error: invalid lvalue in assignment
grid.c:748: error: invalid lvalue in assignment
grid.c:776: error: invalid lvalue in assignment
grid.c:777: error: invalid lvalue in assignment
grid.c:790: error: invalid lvalue in assignment
grid.c:791: error: invalid lvalue in assignment

解决方法:

未知。可能是编译器版本太高的缘故。
解决方法如下:
将上面出错的grid.c文件中对应行数的强制转换去掉。例如grid.c:626、627行修改如下:
      //(PGRIDCOLHDR)pCell1->pRowHdr
= pRowHdr; //  修改
      //(PGRIDCOLHDR)pCell1->pColHdr
= pCol1;
      pCell1->pRowHdr
= pRowHdr;
      pCell1->pColHdr
= pCol1;
其他出错行同上修改。

3.编译make
mg-samples-1.3.1

/usr/local/lib/libminigui.so:
undefined reference to `pthread_kill_other_threads_np'

collect2:
ld 返回 1
make[1]: *** [helloworld] 错误 1
make[1]: Leaving directory `/4020/minigui/mg-samples-1.3.1/src'
make: *** [all-recursive] 错误 1
解决方法如下:
修改libminigui/src/kernel/init.c文件,将435行 删掉
//pthread_kill_other_threads_np (); //
然后重新编译安装lib,就行了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: