前言
本文介绍银河麒麟桌面操作系统V10上基于源码静态编译Qt5.6.1。完成Qt静态便以后,创建一个helloworld程序使用qmake静态编译它,并测试程序运行效果
一、下载源码
wget https://download.qt.io/new_archive/qt/5.6/5.6.1/single/qt-everywhere-opensource-src-5.6.1.tar.gz源码文件信息
File information
- Filename: qt-everywhere-opensource-src-5.6.1.tar.gz
- Path: /new_archive/qt/5.6/5.6.1/single/qt-everywhere-opensource-src-5.6.1.tar.gz
- Size: 383M (401089378 bytes)
- Last modified: Mon, 06 Jun 2016 09:44:00 GMT (Unix time: 1465206240)
- SHA-256 Hash: 2e5be28fcaaf95e179041a0eb95ccca69b17f50e39245e20974fad9469c10f2f
- SHA-1 Hash: 91c450505397cc9b0e73cf664e7cd72d1db9a9ef
- MD5 Hash: ed16ef2a30c674f91f8615678005d44c
- BitTorrent Information Hash: 297a97b4263edc101d0a9abbdfee65f5d4478827
二、编译Qt
检查md5
md5sum qt-everywhere-opensource-src-5.6.1.tar.gz 得到结果
ed16ef2a30c674f91f8615678005d44c qt-everywhere-opensource-src-5.6.1.tar.gz解压、编译
tar -xf qt-everywhere-opensource-src-5.6.1.tar.gz
cd qt-everywhere-opensource-src-5.6.1/
./configure -release -qt-xcb -confirm-license -opensource -prefix /opt/Qt5.6.1 -skip qt3d -skip qtimageformats
构建、安装
make -j4
sudo make install验证
yeqiang@yeqiang-KVM-Virtual-Machine:~/qt-everywhere-opensource-src-5.6.1$ /opt/Qt5.6.1/bin/qmake --version
QMake version 3.0
Using Qt version 5.6.1 in /opt/Qt5.6.1/lib
总结
qt3d及qtimageformats由于兼容性问题,编译不过,暂时排除。
版权声明:本文为m0_46573967原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。