Ubuntu下編譯MINIGUI

使用的Ubuntu版本是 Ubuntu12 i686 

本流程只爲Ubuntu,不包含其他linux發行版。

有很大一部分是摘抄,本文章摘抄的地址爲:https://www.cnblogs.com/xuyh/p/3660168.html

編譯安裝MINIGUI

需要下載的源碼:

http://www.minigui.org/en/download/

這三個都下載下來。

(1)安裝 libminigui-gpl-3.0.12.tar.gz 

tar zxvf libminigui-gpl-3.0.12.tar.gz 

cd libminigui-gpl-3.0.12

./configure

   {報錯:

   Going to generate license pictures ...

   ./configure: line 15530: ./runme.sh: No such file or directory

    WARNING: failed to generate license pictures.

    (無視之)}

make

sudo make   install

(2) 安裝minigui-res-be-3.0.12.tar.gz 

tar zxvf minigui-res-be-3.0.12.tar.gz

cd minigui-res-be-3.0.12

./configure

make

sudo make install

成功以後則在“ls /usr/local/lib”看到minigui的庫文件

修改默認庫路徑

修改你的 /etc/ld.so.conf 文件,在裏面最後新加入一行 /usr/local/lib

然後在終端執行

sudo ldconfig

 

(3)安裝mg-samples-3.0.12.tar.gz 

tar zxf mg-samples-1.3.0.tar.gz

cd mg-samples-3.0.12

Make

{報錯:

checking pkg-config is at least version 0.9.0... yes

checking for MINIGUI... configure: error: Package  requirements  (minigui >= 3.0.10) were not met:

 

No package 'minigui' found

}

解決方法:export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

./configure

     Make

{報錯:

dlgdemo.c:40:27: 錯誤:mgplus/mgplus.h:沒有那個文件或目錄
make[2]: *** [dlgdemo.o] 錯誤 1
make[2]: Leaving directory  `/mnt/hgfs/F/mg-samples-3.0.12/ctrl_dlg'
make[1]: *** [all-recursive] 錯誤 1
make[1]: Leaving directory  `/mnt/hgfs/F/mg-samples-3.0.12/ctrl_dlg'
make: *** [all-recursive] 錯誤 1

}

解決辦法:vim ctrl_dlg/dlgdemo.c ,註釋掉mgplus/mgplus.h

make

make   install

 

到這裏以後就開始出問題了。因爲我用的linux髮型版是Ubuntu12  i686的,這個包是i386的,根本就用不了。

我也搜到了這個包的下載源地址,也沒有編譯好的i686可以下載。

即使把qt-devel-3.3.8-4.fc7.i386.rpm 轉換成dpkg也不行。 

因爲對應的lib裏面的軟連接是錯誤的,根們就沒有合適的libqt-mt.so.3.3.8和libqui.so.1.0.0


後面的下載資源包中,我提供了rpm和轉換好的dpkg下載地址。

最後找了一大圈,只能自己編譯了。編譯方法見後續。

此時可以看看/usr/share 裏面有沒有這個文件。 /usr/share/qt3

(4)安裝 qvfb2-2.0.tar.gz 

tar zxvf qvfb2-2.0.tar.gz 

cd qvfb2-2.0

./configure

{報錯:

checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!

}

解決辦法:需要首先安裝一個qt-devel-3.3.8-4.fc7.i386.rpm

  rpm -iv qt-devel-3.3.8-4.fc7.i386.rpm --force --nodeps

  rm /usr/lib/qt-3.3/lib/libqt-mt.so

  ln -s /usr/lib/qt-3.3/lib/libqt-mt.so.3.3.6 /usr/lib/qt-3.3/lib/libqt-mt.so

  ls  -l  /usr/lib/qt-3.3/lib/

     ./configure --with-qt-includes=/usr/lib/qt-3.3/include  --with-qt-libraries=/usr/lib/qt-3.3/lib --with-qt-dir=/usr/lib/qt-3.3

  這個時候就不會有錯誤了

   make

   make   install

(5)運行mg-samples-3.0.12裏面的housekepper可執行程序測試之:

{

報錯:

start-qvfb :/usr/local/bin/gvfb2 pcxvfb 4194 XVFB-for-MiniGUI-3.0-(Gtk-Version)  800x600-16bpp 

execlp error!!

execl: No such file or directory

 

NEWGAL>PCXVFB: Wait too long for CLIENT.

NEWGAL: Does not find matched engine: pc_xvfb.

KERNEL>InitGUI: Can not get graphics engine information!

 

}

解決辦法:vim /usr/local/etc/MiniGUI.cfg  

其中一句話修改成exec_file = /usr/local/bin/qvfb2

修改完後再測試

 

安裝編譯 qt-x11-free-3.3.8.tar.gz

下載地址看文章後面

tar -xvf qt-x11-free-3.3.8.tar.gz

./configure

make

會發現類似錯誤:

../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type

在對應的頭文件中加入:#include  “stddef.h

然後再make。 大概會遇到3~4次同樣的錯誤提示,同樣在錯誤文件中加入頭文件 stddef.h

原貼地址:http://www.arm9home.net/read.php?tid-16605.html

編譯完成以後在當前目錄文件中就可以找到

參考地址:https://www.cnblogs.com/buzzerrookie/archive/2012/11/19/2776819.html

安裝qt3.3.8

qt安裝的真是麻煩啊,自己記下來以後備用吧。

qt的安裝包qt-x11-free-3.3.8.tar.gz(我是在這下載的http://www.linuxfromscratch.org/~manuel/new-xsl/blfs-book/x/qt.html),安裝環境Ubuntu12.04.1LTS 32位。

先安裝x11proto-xext,然後用新立得安裝libx11-dev,libxext-dev,再解壓qt-x11-free-3.3.8.tar.gz,照着裏面的INSTALL安裝就好了,期間有錯誤是error: ‘ptrdiff_t’ does not name a type,參考這個鏈接http://qt-project.org/forums/viewthread/16992,在出現錯誤的文件里加上#include <stddef.h>這句就好了。

爲了安裝libqt-mt,還需要做下一步,sudo apt-get install libqt3-headers libqt3-mt-dev libqt3-compat-headers libqt3-mt,這樣就好了。

用 sudo apt-get install qt3-dev-tools 解決/usr/share/qt3的問題


轉了一大圈了。再回去qvfb的目錄。使用如下命令。

不知道我中間多走路或者走錯路沒有。反正就是能編譯了。

./configure --with-qt-includes=/usr/share/qt3/include --with-qt-libraries=/usr/share/qt3/lib --with-qt-dir=/usr/share/qt3

make

sudo make install


其他資源地址:

QT3 源碼下載地址:http://download.qt.io/archive/qt/3/

部分截圖:


QT 一些補丁文件:http://www.linuxfromscratch.org/patches/downloads/qt/


qt-x11-free-3.3.8.tar.gz


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章