ubuntu下安装minigui

下载 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 function '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,就行了



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值