debian下qt4静态编译

测试通过,贴一下过程,仅用来记录

 去qt官网下载everywhere的src的tar包,我下载的是4.86的版本

执 行

sudo apt-get install build-essential libpcap0.8-dev libx11-dev libfreetype6-dev libavahi-gobject-dev libSM-dev libXrender-dev libfontconfig-dev libXext-dev

否则有类似下面的缺少库的提示

Basic XLib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /usr/local/src/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

 

执行

sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

否则提示If try -opengl then: All the OpenGL functionality tests failed!


./configure -prefix /home/用户名/Qt/static -opensource -static -opengl -confirm-license -no-webkit -no-script -no-scripttools -nomake examples -nomake docs -nomake demos -nomake translations;make;make install

 

下载qt creator,发现是bin文件,chmod +x,终端运行,安装到~/Qt/qtcreator

 

启动qt creator,指定编译器的目录为SDK下bin目录里面的qmake,然后直接建立UI工程,测试通过。

qt creator的环境,终端改成/usr/bin/xfterm4 -e

posted @ 2013-01-04 22:10  自由出土文物  阅读(486)  评论(0编辑  收藏  举报